Forgot msg in someIrc.reply

This commit is contained in:
Jeremy Fincher 2003-03-28 01:26:37 +00:00
parent f97ab0d0b9
commit d33e67989b

View File

@ -53,8 +53,7 @@ import privmsgs
import callbacks import callbacks
import asyncoreDrivers import asyncoreDrivers
class Relay(privmsgs.CapabilityCheckingPrivmsg): class Relay(callbacks.Privmsg):
capability = 'owner'
def __init__(self): def __init__(self):
callbacks.Privmsg.__init__(self) callbacks.Privmsg.__init__(self)
self.ircs = {} self.ircs = {}
@ -70,6 +69,7 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
self.abbreviations[realIrc] = abbreviation self.abbreviations[realIrc] = abbreviation
self.started = True self.started = True
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
startrelay = privmsgs.checkCapability(startrelay, 'owner')
def relayconnect(self, irc, msg, args): def relayconnect(self, irc, msg, args):
"<network abbreviation> <domain:port> (port defaults to 6667)" "<network abbreviation> <domain:port> (port defaults to 6667)"
@ -86,14 +86,16 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
self.ircs[abbreviation] = newIrc self.ircs[abbreviation] = newIrc
self.abbreviations[newIrc] = abbreviation self.abbreviations[newIrc] = abbreviation
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
relayconnect = privmsgs.checkCapability(relayconnect, 'owner')
def relaydisconnect(self, irc, msg, args): def relaydisconnect(self, irc, msg, args):
"<network>" "<network>"
network = privmsgs.getArgs(args) network = privmsgs.getArgs(args)
otherIrc = self.ircs[network] otherIrc = self.ircs[network]
otherIrc.die()
otherIrc.driver.die() otherIrc.driver.die()
irc.reply(conf.replySuccess) otherIrc.die()
irc.reply(msg, conf.replySuccess)
relaydisconnect = privmsgs.checkCapability(relaydisconnect, 'owner')
def relayjoin(self, irc, msg, args): def relayjoin(self, irc, msg, args):
"<channel>" "<channel>"
@ -103,6 +105,7 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
if channel not in otherIrc.state.channels: if channel not in otherIrc.state.channels:
otherIrc.queueMsg(ircmsgs.join(channel)) otherIrc.queueMsg(ircmsgs.join(channel))
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
relayjoin = privmsgs.checkCapability(relayjoin, 'owner')
def relaypart(self, irc, msg, args): def relaypart(self, irc, msg, args):
"<channel>" "<channel>"
@ -112,6 +115,7 @@ class Relay(privmsgs.CapabilityCheckingPrivmsg):
if channel in otherIrc.state.channels: if channel in otherIrc.state.channels:
otherIrc.queueMsg(ircmsgs.part(channel)) otherIrc.queueMsg(ircmsgs.part(channel))
irc.reply(msg, conf.replySuccess) irc.reply(msg, conf.replySuccess)
relaypart = privmsgs.checkCapability(relaypart, 'owner')
def relaynames(self, irc, msg, args): def relaynames(self, irc, msg, args):
"[<channel>] (only if not sent in the channel itself.)" "[<channel>] (only if not sent in the channel itself.)"