Mercurial > traipse_dev
diff orpg/chat/commands.py @ 119:9314d63c0941 alpha
Traipse Alpha 'OpenRPG' {091029-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:
Adds Bookmarks (Alpha) with cool Smiley Star and Plus Symbol images!
Changes made to the map for increased portability. SnowDog has changes planned in
Core, though.
Added an initial push to the BCG. Not much to see, just shows off how it is
re-writing Main code.
Fix to remote admin commands
Minor fix to texted based server, works in /System/ folder
Some Core changes to gametree to correctly disply Pretty Print, thanks David!
Fix to Splitter Nodes not being created.
Added images to Plugin Control panel for Autostart feature
Fix to massive amounts of images loading; from Core
fix to gsclient so with_statement imports
Added 'boot' command to remote admin
Prep work in Pass tool for remote admin rankings and different passwords, ei,
Server, Admin, Moderator, etc.
Remote Admin Commands more organized, more prep work.
Added Confirmation window for sent nodes.
Minor changes to allow for portability to an OpenSUSE linux OS (hopefully without
breaking)
{091028}
00:
Made changes to gametree to start working with Element Tree, mostly from Core
Minor changes to Map to start working with Element Tree, from Core
Preliminary changes to map efficiency, from FlexiRPG
Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG
Changes to main.py to start working with Element Tree
{091029}
00:
Changes made to server to start working with Element Tree.
Changes made to Meta Server Lib. Prepping test work for a multi meta network
page.
Minor bug fixed with mini to gametree
Zoom Mouse plugin added.
Known Issue: Disconnecting causes an server side error. XML data is not being
passed correctly.
author | sirebral |
---|---|
date | Thu, 29 Oct 2009 20:35:28 -0500 |
parents | 17b64e9133e9 |
children | fba298d65cf8 |
line wrap: on
line diff
--- a/orpg/chat/commands.py Wed Oct 28 14:24:54 2009 -0500 +++ b/orpg/chat/commands.py Thu Oct 29 20:35:28 2009 -0500 @@ -315,12 +315,9 @@ def postLoggingState( self ): logfile = self.settings.get_setting( 'GameLogPrefix' ) try: - if logfile[0] != ANTI_LOG_CHAR: - comment = 'is' - else: - comment = 'is not' - except: - comment = 'is not' + if logfile[0] != ANTI_LOG_CHAR: comment = 'is' + else: comment = 'is not' + except: comment = 'is not' suffix = time.strftime( '-%d-%m-%y.html', time.localtime( time.time() ) ) self.chat.InfoPost('Log filename is "%s%s", system is %s logging.' % (logfile, suffix, comment) ) @@ -339,7 +336,6 @@ self.session.set_name(str(cmdargs)) # def on_status - end - # This subroutine will set the players netork status. # # !self : instance of self @@ -404,7 +400,6 @@ if self.shortcmdlist[shortcmd] == cmd: msg += ', <b><font color="#0000CC">%s</font></b>' % (shortcmd) msg += ' %s' % (self.cmdlist[cmd]['help']) - self.chat.InfoPost(msg) # This subroutine will either show the list of currently ignored users @@ -459,8 +454,7 @@ if role_pwd != None: for m in player_ids: self.session.set_role(m.strip(),role,role_pwd) - except: - traceback.print_exc() + except: traceback.print_exc() # return # This subroutine implements the whisper functionality that enables a user @@ -475,13 +469,11 @@ delim = cmdargs.find("=") if delim < 0: - if self.previous_whisper: - player_ids = self.previous_whisper + if self.previous_whisper: player_ids = self.previous_whisper else: self.chat.InfoPost("**Incorrect syntax for whisper." + str(delim)) return - else: - player_ids = string.split(cmdargs[:delim], ",") + else: player_ids = string.split(cmdargs[:delim], ",") self.previous_whisper = player_ids mesg = string.strip(cmdargs[delim+1:]) self.chat.whisper_to_players(mesg,player_ids) @@ -494,8 +486,7 @@ args = string.split(cmdargs,None,-1) delim = cmdargs.find("=") - if delim > 0: - group_ids = string.split(cmdargs[:delim], ",") + if delim > 0: group_ids = string.split(cmdargs[:delim], ",") elif args[0] == "add": if not orpg.player_list.WG_LIST.has_key(args[2]): orpg.player_list.WG_LIST[args[2]] = {} @@ -540,10 +531,8 @@ for gid in group_ids: idList = "" for n in orpg.player_list.WG_LIST[gid]: - if idList == "": - idList = str(n) - else: - idList = str(n) + ", " + idList + if idList == "": idList = str(n) + else: idList = str(n) + ", " + idList self.on_whisper(idList + "=" + self.settings.get_setting("gwtext") + msg) #--------------------------------------------------------- @@ -559,12 +548,10 @@ if len(the_gms): gmstring = "" for each_gm in the_gms: - if gmstring != "": - gmstring += "," + if gmstring != "": gmstring += "," gmstring += each_gm self.on_whisper(gmstring + "=" + cmdargs) - else: - self.chat.InfoPost("**No GMs to Whisper to.") + else: self.chat.InfoPost("**No GMs to Whisper to.") @debugging def on_moderate(self, cmdargs): @@ -572,20 +559,16 @@ pos = cmdargs.find("=") if (pos < 0): plist = "" - if cmdargs.lower() == "on": - action = "enable" - elif cmdargs.lower() == "off": - action="disable" + if cmdargs.lower() == "on": action = "enable" + elif cmdargs.lower() == "off": action="disable" else: self.chat.InfoPost("Wrong syntax for moderate command!") return else: plist = string.strip(cmdargs[:pos]) tag = string.strip(cmdargs[pos+1:]) - if tag.lower() == "on": - action = "addvoice" - elif tag.lower() == "off": - action = "delvoice" + if tag.lower() == "on": action = "addvoice" + elif tag.lower() == "off": action = "delvoice" else: self.chat.InfoPost("Wrong syntax for moderate command!") return @@ -594,8 +577,7 @@ msg = "<moderate" msg += " action = '" + action + "'" msg +=" from = '" + self.session.id + "' pwd='" + pwd + "'" - if (plist != ""): - msg += " users='"+plist+"'" + if (plist != ""): msg += " users='"+plist+"'" msg += " />" self.session.outbox.put(msg) pass @@ -630,8 +612,7 @@ if (panel.sendtarget == playerid): self.chat.Post("Cannot invoke tab: Tab already exists.") return - try: - displaypanel = self.chat.parent.create_whisper_tab(playerid) + try: displaypanel = self.chat.parent.create_whisper_tab(playerid) except: self.chat.Post("That ID# is not valid.") return @@ -661,8 +642,7 @@ #raw command return state info msg = "<br /><b>Remote Administrator Config:</b>" if pass_state != 1 : msg += " Password not set. Remote admin functions disabled<br />" - else: - msg += " Enabled. Using password '"+pwd+"'<br />" + else: msg += " Enabled. Using password '"+pwd+"'<br />" self.chat.SystemPost(msg) return