Replace deprecated string.split() calls in /python/IPO/*.py.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@11448 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
f117ef543f
commit
60b5e31445
|
@ -44,7 +44,7 @@ bankdatabase = "ImperialBank_DB"
|
|||
fees = (service_charge/100.0)+1
|
||||
bank = CFBank.CFBank(bankdatabase)
|
||||
|
||||
text = string.split(Crossfire.WhatIsMessage())
|
||||
text = Crossfire.WhatIsMessage().split()
|
||||
thanks_message = [ \
|
||||
'Thank you for banking the Imperial Way.', \
|
||||
'Thank you for banking the Imperial Way.', \
|
||||
|
|
|
@ -35,7 +35,7 @@ whoami = Crossfire.WhoAmI()
|
|||
boardname = Crossfire.ScriptParameters()
|
||||
if boardname:
|
||||
|
||||
text = string.split(Crossfire.WhatIsMessage(), ' ', 1)
|
||||
text = Crossfire.WhatIsMessage().split(' ', 1)
|
||||
|
||||
if text[0] == 'help' or text[0] == 'yes':
|
||||
message='Help for %s\nList of commands:\n\n- list\n- write <message>\n- remove <id>\n'%boardname
|
||||
|
|
|
@ -58,7 +58,7 @@ x = activator.X
|
|||
y = activator.Y
|
||||
|
||||
log = CFLog.CFLog()
|
||||
text = string.split(Crossfire.WhatIsMessage())
|
||||
text = Crossfire.WhatIsMessage().split()
|
||||
|
||||
if text[0] == 'help' or text[0] == 'yes':
|
||||
# split the help message in two parts to prevent the server from truncating it.
|
||||
|
@ -166,7 +166,7 @@ elif text[0] == 'send':
|
|||
inv = activator.CheckInventory(sackName)
|
||||
while inv:
|
||||
next = inv.Below
|
||||
text2 = string.split(inv.Name)
|
||||
text2 = inv.Name.split()
|
||||
if len(text2) == 5 and text2[0] == sackName and text2[1] == 'T:' and text2[3] == 'F:' and text2[2] == text[1]:
|
||||
map = Crossfire.ReadyMap(storage_map)
|
||||
if map:
|
||||
|
@ -197,7 +197,7 @@ elif text[0] == 'receive':
|
|||
item = map.ObjectAt(storage_x, storage_y)
|
||||
while item:
|
||||
previous = item.Above
|
||||
text2 = string.split(item.Name)
|
||||
text2 = item.Name.split()
|
||||
if len(text2) == 5 and text2[0] == sackName and text2[4] == activatorname:
|
||||
item.Name = item.Name+' (used)'
|
||||
item.InsertInto(activator)
|
||||
|
|
|
@ -34,7 +34,7 @@ x=activator.X
|
|||
y=activator.Y
|
||||
|
||||
log = CFLog.CFLog()
|
||||
text = string.split(Crossfire.WhatIsMessage())
|
||||
text = Crossfire.WhatIsMessage().split()
|
||||
|
||||
if text[0] == 'seen':
|
||||
if len(text)==2:
|
||||
|
|
|
@ -34,7 +34,7 @@ idlist = []
|
|||
|
||||
inv = whoami.Inventory
|
||||
while inv:
|
||||
text = string.split(inv.Name)
|
||||
text = inv.Name.split()
|
||||
if text[0] == 'mailscroll' or text[0] == 'mailwarning':
|
||||
if text[0] == 'mailscroll':
|
||||
type = 1
|
||||
|
|
Loading…
Reference in New Issue