GitHub: fix bug when trying to announce {add,remove} an {existing,not existing} announce.

master
Valentin Lorentz 2011-03-03 17:28:48 +01:00
parent 32f1e6da89
commit f9a9e2b5ca
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,7 @@ class GitHub(callbacks.Plugin):
elif channel in announces[repo]:
irc.error(_('This repository is already announced to this '
'channel.'))
return
else:
announces[repo].append(channel)
self._save(announces)
@ -223,6 +224,7 @@ class GitHub(callbacks.Plugin):
elif channel not in announces[repo]:
irc.error(_('This repository is not yet announced to this '
'channel.'))
return
else:
announces[repo].remove(channel)
self._save(announces)