mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32: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)
|
irc = irclib.Irc(nick, user, ident)
|
||||||
for Class in privmsgs.standardPrivmsgModules:
|
for Class in privmsgs.standardPrivmsgModules:
|
||||||
irc.addCallback(Class())
|
irc.addCallback(Class())
|
||||||
ircdb.startup = True
|
world.startup = True
|
||||||
lines = m.get_payload().splitlines()
|
lines = m.get_payload().splitlines()
|
||||||
(startup, after376) = tuple(itersplit(lines, lambda s: not s))
|
(startup, after376) = tuple(itersplit(lines, lambda s: not s))
|
||||||
debug.printf('startup: %r' % startup)
|
#debug.printf('startup: %r' % startup)
|
||||||
debug.printf('after376: %r' % after376)
|
#debug.printf('after376: %r' % after376)
|
||||||
for line in filter(None, startup):
|
for line in filter(None, startup):
|
||||||
if not line.startswith('#'):
|
if not line.startswith('#'):
|
||||||
irc.feedMsg(ircmsgs.privmsg(irc.nick, line))
|
irc.feedMsg(ircmsgs.privmsg(irc.nick, line))
|
||||||
irc.reset()
|
irc.reset()
|
||||||
ircdb.startup = False
|
world.startup = False
|
||||||
msgs = [ircmsgs.privmsg(irc.nick, line) for line in after376]
|
msgs = [ircmsgs.privmsg(irc.nick, line) for line in after376]
|
||||||
irc.addCallback(ConfigAfter376(msgs))
|
irc.addCallback(ConfigAfter376(msgs))
|
||||||
driver = asyncoreDrivers.AsyncoreDriver(server)
|
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
|
# capability in a given channel. This should be easy, but the various
|
||||||
# different cases are all hard to get right.
|
# different cases are all hard to get right.
|
||||||
|
|
||||||
if startup:
|
if world.startup:
|
||||||
# Are we in special startup mode?
|
# Are we in special startup mode?
|
||||||
if isAntiCapability(capability):
|
if isAntiCapability(capability):
|
||||||
return False
|
return False
|
||||||
@ -473,13 +473,4 @@ def checkCapabilities(hostmask, capabilities, requireAll=False):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
#################################################
|
|
||||||
#################################################
|
|
||||||
## Don't even *think* about messing with this. ##
|
|
||||||
#################################################
|
|
||||||
#################################################
|
|
||||||
#################################################
|
|
||||||
startup = False
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# 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'))
|
('func_code', 'func_defaults', 'func_doc'))
|
||||||
return module
|
return module
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
#################################################
|
||||||
|
#################################################
|
||||||
|
#################################################
|
||||||
|
## Don't even *think* about messing with this. ##
|
||||||
|
#################################################
|
||||||
|
#################################################
|
||||||
|
#################################################
|
||||||
|
startup = False
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
Loading…
Reference in New Issue
Block a user