- remove python path bootstrapping - init script not appends module path
for us. - add guild functions to init and remove scripts git-svn-id: svn://svn.code.sf.net/p/crossfire/code/trunk/maps@3001 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
054dbeace8
commit
7cf2013a82
|
@ -21,9 +21,6 @@
|
|||
#Updated to use new path functions in CFPython -Todd Mitchell
|
||||
|
||||
import CFPython
|
||||
import sys
|
||||
import os.path
|
||||
sys.path.append(os.path.join(CFPython.GetDataDirectory(),CFPython.GetMapDirectory(),'python'))
|
||||
import CFLog
|
||||
|
||||
activator = CFPython.WhoIsActivator()
|
||||
|
|
|
@ -2,4 +2,9 @@ import CFPython;
|
|||
import os.path
|
||||
import sys
|
||||
|
||||
print "Running python initialize script."
|
||||
sys.path.insert(0, os.path.join(CFPython.GetDataDirectory(), CFPython.GetMapDirectory(), 'python'))
|
||||
|
||||
import CFGuilds
|
||||
print "Updating Guilds"
|
||||
CFGuilds.GuildUpdate()
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#
|
||||
|
||||
import CFPython
|
||||
import sys
|
||||
import os.path
|
||||
sys.path.append(os.path.join(CFPython.GetDataDirectory(),CFPython.GetMapDirectory(),'python'))
|
||||
import CFLog
|
||||
|
||||
activator = CFPython.WhoIsActivator()
|
||||
|
@ -28,3 +25,4 @@ name = CFPython.GetName(activator)
|
|||
|
||||
log = CFLog.CFLog()
|
||||
log.kick_update(name)
|
||||
|
||||
|
|
|
@ -21,9 +21,6 @@
|
|||
#Updated to use new path functions in CFPython -Todd Mitchell
|
||||
|
||||
import CFPython
|
||||
import sys
|
||||
import os.path
|
||||
sys.path.append(os.path.join(CFPython.GetDataDirectory(),CFPython.GetMapDirectory(),'python'))
|
||||
import CFMail
|
||||
import CFLog
|
||||
|
||||
|
@ -33,6 +30,8 @@ ip = CFPython.WhatIsMessage()
|
|||
|
||||
mail = CFMail.CFMail()
|
||||
log = CFLog.CFLog()
|
||||
|
||||
|
||||
total = mail.countmail(name)
|
||||
if log.info(name):
|
||||
log.login_update(name, ip)
|
||||
|
@ -43,3 +42,4 @@ if total > 0:
|
|||
CFPython.Write('You have some mail waiting for you', activator)
|
||||
else:
|
||||
CFPython.Write('No mail...', activator)
|
||||
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
#
|
||||
|
||||
import CFPython
|
||||
import sys
|
||||
import os.path
|
||||
sys.path.append(os.path.join(CFPython.GetDataDirectory(),CFPython.GetMapDirectory(),'python'))
|
||||
import CFLog
|
||||
|
||||
activator = CFPython.WhoIsActivator()
|
||||
|
|
|
@ -22,11 +22,9 @@
|
|||
# acount cleanup - Todd Mitchell
|
||||
|
||||
import CFPython
|
||||
import sys
|
||||
import os.path
|
||||
sys.path.append(os.path.join(CFPython.GetDataDirectory(),CFPython.GetMapDirectory(),'python'))
|
||||
import CFLog
|
||||
import CFBank
|
||||
import CFGuilds
|
||||
|
||||
activator = CFPython.WhoIsActivator()
|
||||
name = CFPython.GetName(activator)
|
||||
|
@ -38,3 +36,7 @@ log.remove(name)
|
|||
#when the player quits
|
||||
bank = CFBank.CFBank('ImperialBank_DB')
|
||||
bank.remove_account(name)
|
||||
|
||||
in_guild = CFGuilds.SearchGuilds(name)
|
||||
if in_guild:
|
||||
CFGuilds.CFGuild(in_guild).remove_member(name)
|
||||
|
|
Loading…
Reference in New Issue