mirror of
https://github.com/ncoevoet/ChanTracker.git
synced 2025-05-02 00:11:05 -05:00
few api changes
This commit is contained in:
parent
38c9edafdc
commit
72e5faac7e
50
plugin.py
50
plugin.py
@ -1230,10 +1230,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
+<mode> targets for duration <reason> is mandatory"""
|
+<mode> targets for duration <reason> is mandatory"""
|
||||||
if mode in self.registryValue('modesToAsk',channel=channel) or mode in self.registryValue('modesToAskWhenOpped',channel=channel):
|
if mode in self.registryValue('modesToAsk',channel=channel) or mode in self.registryValue('modesToAskWhenOpped',channel=channel):
|
||||||
b = self._adds(irc,msg,args,channel,mode,items,getDuration(seconds),reason)
|
b = self._adds(irc,msg,args,channel,mode,items,getDuration(seconds),reason)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown pattern or pattern already active')
|
irc.reply('unknown pattern or pattern already active')
|
||||||
else:
|
else:
|
||||||
irc.reply('selected mode is not supported by config')
|
irc.reply('selected mode is not supported by config')
|
||||||
@ -1245,10 +1242,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
+q targets for duration <reason> is mandatory"""
|
+q targets for duration <reason> is mandatory"""
|
||||||
b = self._adds(irc,msg,args,channel,'q',items,getDuration(seconds),reason)
|
b = self._adds(irc,msg,args,channel,'q',items,getDuration(seconds),reason)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown pattern, or pattern already active')
|
irc.reply('unknown pattern, or pattern already active')
|
||||||
q = wrap(q,['op',commalist('something'),any('getTs',True),rest('text')])
|
q = wrap(q,['op',commalist('something'),any('getTs',True),rest('text')])
|
||||||
|
|
||||||
@ -1257,10 +1251,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
+b targets for duration <reason> is mandatory"""
|
+b targets for duration <reason> is mandatory"""
|
||||||
b = self._adds(irc,msg,args,channel,'b',items,getDuration(seconds),reason)
|
b = self._adds(irc,msg,args,channel,'b',items,getDuration(seconds),reason)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown pattern, or pattern already active')
|
irc.reply('unknown pattern, or pattern already active')
|
||||||
b = wrap(b,['op',commalist('something'),any('getTs',True),rest('text')])
|
b = wrap(b,['op',commalist('something'),any('getTs',True),rest('text')])
|
||||||
|
|
||||||
@ -1269,10 +1260,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
+I targets for duration <reason> is mandatory"""
|
+I targets for duration <reason> is mandatory"""
|
||||||
b = self._adds(irc,msg,args,channel,'I',items,getDuration(seconds),reason)
|
b = self._adds(irc,msg,args,channel,'I',items,getDuration(seconds),reason)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown pattern, or pattern already active')
|
irc.reply('unknown pattern, or pattern already active')
|
||||||
i = wrap(i,['op',commalist('something'),any('getTs',True),rest('text')])
|
i = wrap(i,['op',commalist('something'),any('getTs',True),rest('text')])
|
||||||
|
|
||||||
@ -1281,10 +1269,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
+e targets for duration <reason> is mandatory"""
|
+e targets for duration <reason> is mandatory"""
|
||||||
b = self._adds(irc,msg,args,channel,'e',items,getDuration(seconds),reason)
|
b = self._adds(irc,msg,args,channel,'e',items,getDuration(seconds),reason)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown pattern, or pattern already active')
|
irc.reply('unknown pattern, or pattern already active')
|
||||||
e = wrap(e,['op',commalist('something'),any('getTs'),rest('text')])
|
e = wrap(e,['op',commalist('something'),any('getTs'),rest('text')])
|
||||||
|
|
||||||
@ -1293,10 +1278,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
sets -<mode> on them, if * found, remove them all"""
|
sets -<mode> on them, if * found, remove them all"""
|
||||||
b = self._removes(irc,msg,args,channel,mode,items)
|
b = self._removes(irc,msg,args,channel,mode,items)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown patterns, already removed or unsupported mode')
|
irc.reply('unknown patterns, already removed or unsupported mode')
|
||||||
undo = wrap(undo,['op','letter',many('something')])
|
undo = wrap(undo,['op','letter',many('something')])
|
||||||
|
|
||||||
@ -1305,10 +1287,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
sets -q on them, if * found, remove them all"""
|
sets -q on them, if * found, remove them all"""
|
||||||
b = self._removes(irc,msg,args,channel,'q',items)
|
b = self._removes(irc,msg,args,channel,'q',items)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown patterns, already removed or unsupported mode')
|
irc.reply('unknown patterns, already removed or unsupported mode')
|
||||||
uq = wrap(uq,['op',many('something')])
|
uq = wrap(uq,['op',many('something')])
|
||||||
|
|
||||||
@ -1317,10 +1296,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
sets -b on them, if * found, remove them all"""
|
sets -b on them, if * found, remove them all"""
|
||||||
b = self._removes(irc,msg,args,channel,'b',items)
|
b = self._removes(irc,msg,args,channel,'b',items)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown patterns, already removed or unsupported mode')
|
irc.reply('unknown patterns, already removed or unsupported mode')
|
||||||
ub = wrap(ub,['op',many('something')])
|
ub = wrap(ub,['op',many('something')])
|
||||||
|
|
||||||
@ -1329,10 +1305,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
sets -I on them, if * found, remove them all"""
|
sets -I on them, if * found, remove them all"""
|
||||||
b = self._removes(irc,msg,args,channel,'I',items)
|
b = self._removes(irc,msg,args,channel,'I',items)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown patterns, already removed or unsupported mode')
|
irc.reply('unknown patterns, already removed or unsupported mode')
|
||||||
ui = wrap(ui,['op',many('something')])
|
ui = wrap(ui,['op',many('something')])
|
||||||
|
|
||||||
@ -1341,10 +1314,7 @@ class ChanTracker(callbacks.Plugin,plugins.ChannelDBHandler):
|
|||||||
|
|
||||||
sets -e on them, if * found, remove them all"""
|
sets -e on them, if * found, remove them all"""
|
||||||
b = self._removes(irc,msg,args,channel,'e',items)
|
b = self._removes(irc,msg,args,channel,'e',items)
|
||||||
if not msg.nick == irc.nick:
|
if not msg.nick == irc.nick and not b:
|
||||||
if b:
|
|
||||||
irc.replySuccess()
|
|
||||||
return
|
|
||||||
irc.reply('unknown patterns, already removed or unsupported mode')
|
irc.reply('unknown patterns, already removed or unsupported mode')
|
||||||
ue = wrap(ue,['op',many('something')])
|
ue = wrap(ue,['op',many('something')])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user