diff orpg/chat/chatwnd.py @ 196:0bc44a57ae6c alpha

Traipse Alpha 'OpenRPG' {100425-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Patch-2) New Features: New Namespace method with two new syntaxes New Namespace Internal is context sensitive, always! New Namespace External is 'as narrow as you make it' New PluginDB access for URL2Link plugin New to Forms, they now show their content in Design Mode Fixes: Fix to Server GUI startup errors Fix to Server GUI Rooms tab updating Fix to Chat and Settings if non existant die roller is picked Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated Fix to Alias Lib's Export to Tree, Open, Save features Fix to alias node, now works properly Fix to Splitter node, minor GUI cleanup Fix to Backgrounds not loading through remote loader Fix to Node name errors Fix to rolling dice in chat Whispers Fix to Splitters Sizing issues
author sirebral
date Sun, 25 Apr 2010 23:26:55 -0500
parents b633f4c64aae
children 9ac90179e8d8
line wrap: on
line diff
--- a/orpg/chat/chatwnd.py	Sat Apr 24 08:37:20 2010 -0500
+++ b/orpg/chat/chatwnd.py	Sun Apr 25 23:26:55 2010 -0500
@@ -1032,7 +1032,7 @@
         sound_file = self.settings.get_setting("SendSound")
         if sound_file != '': component.get('sound').play(sound_file)
         if s[0] != "/": ## it's not a slash command
-            s = self.ParsePost( s, True, True )
+            s = Parse.Post(s, self, True, True)
         else: self.chat_cmds.docmd(s) # emote is in chatutils.py
 
     def on_chat_key_down(self, event):
@@ -1171,7 +1171,7 @@
         if len(dieMod) and dieMod[0] not in "*/-+": dieMod = "+" + dieMod
         dieText += dieMod
         dieText = "[" + dieText + "]"
-        self.ParsePost(dieText, 1, 1)
+        Parse.Post(dieText, self, 1, 1)
         self.chattxt.SetFocus()
 
     def on_chat_save(self, evt):
@@ -1301,7 +1301,7 @@
         return text
 
     def emote_message(self, text):
-        text = Parse.Normalize(text)
+        text = Parse.Normalize(text, self)
         text = self.colorize(self.emotecolor, text)
         if self.type == MAIN_TAB and self.sendtarget == 'all': self.send_chat_message(text,chat_msg.EMOTE_MESSAGE)
         elif self.type == MAIN_TAB and self.sendtarget == "gm":
@@ -1319,7 +1319,7 @@
 
     def whisper_to_players(self, text, player_ids):
         tabbed_whispers_p = self.settings.get_setting("tabbedwhispers")
-        text = Parse.Normalize(text)
+        text = Parse.Normalize(text, self)
         player_names = ""
         for m in player_ids:
             id = m.strip()
@@ -1386,6 +1386,7 @@
         if (strip_img == "0"): display_name = chat_util.strip_img_tags(display_name)
         recvSound = "RecvSound"
         # act on the type of messsage
+
         if (type == chat_msg.CHAT_MESSAGE):
             text = "<b>" + display_name + "</b>: " + text
             self.Post(text)
@@ -1591,11 +1592,6 @@
             logger.general("EXCEPTION: " + str(e))
             return "[ERROR]"
 
-    def ParsePost(self, s, send=False, myself=False):
-        s = Parse.Normalize(s)
-        self.set_colors()
-        self.Post(s,send,myself)
-
     # This subroutine builds a chat display name.
     #
     def chat_display_name(self, player):