Skip to content
Browse files

* Flame Sage's fixed RawSay

  • Loading branch information...
1 parent 3b4c0ff commit 01e5a07e2df6c0b8d51785ec139fb2580c328cc1 @chris062689 chris062689 committed with Apr 14, 2012
Showing with 16 additions and 4 deletions.
  1. +7 −0 code/controllers/managers/msghand.dm
  2. +8 −3 code/models/bot.dm
  3. +1 −1 code/models/showcode_snippet.dm
View
7 code/controllers/managers/msghand.dm
@@ -10,24 +10,31 @@ MessageHandler
proc
GetMsg(mob/chatter/From, msg, clean)
if(!clean) msg = TextMan.Sanitize(msg)
+
var/fmsg = msg
var/omsg = msg
+
if(!(ckey(From.name) in owner.msgHandlers))
var/Messenger/im = new(owner, From.name)
im.Display(owner)
+
winset(owner, "cim_[ckey(From.name)]", "is-visible=true;")
if(owner.filter) omsg = TextMan.FilterChat(omsg, owner)
if(owner.filter) fmsg = TextMan.FilterChat(fmsg, From)
+
if(owner.show_smileys) omsg = TextMan.ParseSmileys(omsg)
if(From.show_smileys) fmsg = TextMan.ParseSmileys(fmsg)
omsg = TextMan.ParseLinks(omsg)
fmsg = TextMan.ParseLinks(fmsg)
+
var/show_oimages = owner.show_images
if(show_oimages) show_oimages = !(owner.ignoring(From) & IMAGES_IGNORE)
var/show_fimages = From.show_images
if(show_fimages) show_fimages = !(From.ignoring(owner) & IMAGES_IGNORE)
+
omsg = TextMan.ParseTags(omsg, owner.show_colors, owner.show_highlight,show_oimages)
fmsg = TextMan.ParseTags(fmsg, From.show_colors, From.show_highlight,show_fimages)
+
if(From != owner)
From << output(From.ParseMsg(From, fmsg, From.say_format), "cim_[ckey(owner.name)].output")
if(From.im_sounds) From << sound(From.snt_msg_snd,,,,From.im_volume)
View
11 code/models/bot.dm
@@ -236,9 +236,14 @@ _____________________ \[end of announcement\] _____________________
fade_name = "[name]"
- RawSay(msg, mob/chatter/C, echoed)
- for(var/mob/chatter/c in Chan.chatters)
- c << output(c.ParseMsg(src, msg, c.say_format),"[ckey(Chan.name)].chat.default_output")
+ RawSay(msg, mob/chatter/receiver, echoed)
+ if(receiver)
+ // Message for a specific chatter.
+ receiver << output(receiver.ParseMsg(src, msg, receiver.say_format),"[ckey(Chan.name)].chat.default_output")
+ else
+ // Message for all chatters.
+ for(var/mob/chatter/a in Chan.chatters)
+ a << output(a.ParseMsg(src, msg, a.say_format),"[ckey(Chan.name)].chat.default_output")
GameSay(msg, window)
if(!window) return
View
2 code/models/showcode_snippet.dm
@@ -46,4 +46,4 @@
else
var/Messenger/im = new(ChatMan.Get(owner), target)
im.Display(ChatMan.Get(owner))
- MsgMan.RouteMsg(ChatMan.Get(owner), ChatMan.Get(target), "[owner] has semt a private [code ? "code" : "text"] snippet. <a href='byond://?src=\ref[ChatMan]&target=\ref[ChatMan.Get(owner)]&action=show[code ? "code" : "text"]&index=[id]'>Show [code ? "Code" : "Text"]</a>", 0)
+ MsgMan.RouteMsg(ChatMan.Get(owner), ChatMan.Get(target), "[owner] has semt a private [code ? "code" : "text"] snippet. <a href='byond://?src=\ref[ChatMan]&target=\ref[ChatMan.Get(owner)]&action=show[code ? "code" : "text"]&index=[id]'>Show [code ? "Code" : "Text"]</a>", 0)

0 comments on commit 01e5a07

Please sign in to comment.
Something went wrong with that request. Please try again.