mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 20:22:36 +01:00
Moved startup to world.
This commit is contained in:
parent
273e426972
commit
ff8a967647
@ -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)
|
||||
|
11
src/ircdb.py
11
src/ircdb.py
@ -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:
|
||||
|
10
src/world.py
10
src/world.py
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user