Moved startup to world.

This commit is contained in:
Jeremy Fincher 2003-03-25 23:42:37 +00:00
parent 273e426972
commit ff8a967647
3 changed files with 15 additions and 14 deletions

View File

@ -113,16 +113,16 @@ def processConfigFile(filename):
irc = irclib.Irc(nick, user, ident)
for Class in privmsgs.standardPrivmsgModules:
irc.addCallback(Class())
ircdb.startup = True
world.startup = True
lines = m.get_payload().splitlines()
(startup, after376) = tuple(itersplit(lines, lambda s: not s))
debug.printf('startup: %r' % startup)
debug.printf('after376: %r' % after376)
#debug.printf('startup: %r' % startup)
#debug.printf('after376: %r' % after376)
for line in filter(None, startup):
if not line.startswith('#'):
irc.feedMsg(ircmsgs.privmsg(irc.nick, line))
irc.reset()
ircdb.startup = False
world.startup = False
msgs = [ircmsgs.privmsg(irc.nick, line) for line in after376]
irc.addCallback(ConfigAfter376(msgs))
driver = asyncoreDrivers.AsyncoreDriver(server)

View File

@ -399,7 +399,7 @@ def checkCapability(hostmask, capability, users=users, channels=channels):
# capability in a given channel. This should be easy, but the various
# different cases are all hard to get right.
if startup:
if world.startup:
# Are we in special startup mode?
if isAntiCapability(capability):
return False
@ -473,13 +473,4 @@ def checkCapabilities(hostmask, capabilities, requireAll=False):
else:
return False
#################################################
#################################################
#################################################
## Don't even *think* about messing with this. ##
#################################################
#################################################
#################################################
startup = False
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:

View File

@ -194,4 +194,14 @@ def superReload(module):
('func_code', 'func_defaults', 'func_doc'))
return module
'''
#################################################
#################################################
#################################################
## Don't even *think* about messing with this. ##
#################################################
#################################################
#################################################
startup = False
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: