mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added some error checking to join and part.
This commit is contained in:
parent
bc6f4bd149
commit
3f081ee21c
@ -243,6 +243,9 @@ class Relay(callbacks.Privmsg, plugins.Toggleable):
|
||||
irc.error(msg, 'You must use the start command first.')
|
||||
return
|
||||
channel = privmsgs.getArgs(args)
|
||||
if not ircutils.isChannel(channel):
|
||||
irc.error(msg, '%r is not a valid channel.' % channel)
|
||||
return
|
||||
self.channels.add(ircutils.toLower(channel))
|
||||
for otherIrc in self.ircs.itervalues():
|
||||
if channel not in otherIrc.state.channels:
|
||||
@ -261,6 +264,9 @@ class Relay(callbacks.Privmsg, plugins.Toggleable):
|
||||
irc.error(msg, 'You must use the start command first.')
|
||||
return
|
||||
channel = privmsgs.getArgs(args)
|
||||
if not ircutils.isChannel(channel):
|
||||
irc.error(msg, '%r is not a valid channel.' % channel)
|
||||
return
|
||||
self.channels.remove(ircutils.toLower(channel))
|
||||
for otherIrc in self.ircs.itervalues():
|
||||
if channel in otherIrc.state.channels:
|
||||
|
Loading…
Reference in New Issue
Block a user