From 5eb8d7a9268a21baa4f862fb099bcdb1e515423e Mon Sep 17 00:00:00 2001 From: ryo_saeba Date: Sat, 20 Nov 2010 11:16:44 +0000 Subject: [PATCH] Fix issue when message is not defined. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@14106 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/CFGuildClearance.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/python/CFGuildClearance.py b/python/CFGuildClearance.py index 285d64ca3..652730128 100644 --- a/python/CFGuildClearance.py +++ b/python/CFGuildClearance.py @@ -17,7 +17,7 @@ def find_player(object): whoami=Crossfire.WhoAmI() -texta=string.split(Crossfire.WhatIsMessage()) + def CheckClearance(lParams,oActivator): ClearanceLevels={"Initiate":1,"Novice":2,"Guildman":3,"Journeyman":4,"Master":5,"GuildMaster":6} @@ -44,7 +44,11 @@ def CheckClearance(lParams,oActivator): if __name__=='__builtin__': - + + texta = [ '' ] + if Crossfire.WhatIsMessage(): + texta=string.split(Crossfire.WhatIsMessage()) + if (texta[0].upper() == 'ENTER'): Params=string.split(Crossfire.ScriptParameters()) if CheckClearance(Params,activator):