| View previous topic :: View next topic |
| Author |
Message |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Wed Oct 24, 2007 12:03 am Post subject: bot remove the akick and founder only allowed to add akick.. |
|
|
Hi everyone i need a script that bot have a capability to check if the user that use akick is founder or sop on channel.. when sop add akick on channel the bot will remove the akick and msg. him/her only founder can add akick...and when the founder add an akick the bot will ignore it. i hope someone can help me thanks a lot and have a nice day  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Oct 24, 2007 7:22 am Post subject: |
|
|
I'm not that familiar with dalnet and chanserv, how would you (or your bot) get notified that someone added an akick? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Thu Oct 25, 2007 12:20 am Post subject: |
|
|
hi nml375 eggdrop is notified on notice example like this
[11:31] -ChanServ:@#channel- [VERBOSE] ^BNickOfOpAddAkick^B!~ident@isp.of.user => akick #ateneo add *!*@85.107.210.208 |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Oct 25, 2007 9:24 pm Post subject: |
|
|
ChanServ "WHY" command would be needed also:
| Quote: | | -ChanServ- Usage - WHY <channel> <nick> |
Reply:
| Quote: | | -ChanServ- Boues has FOUNDER access to #channel. Reason: Identification to the founder's nickname, Almozo. Channel Frozen: NO |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Fri Oct 26, 2007 11:30 pm Post subject: |
|
|
yes Alchera i hope someone can help me regarding this thanks a lot in advance.  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Oct 27, 2007 9:44 am Post subject: |
|
|
One thing that came to mind when I sat down and started to scratch my head..
Would malicousAOP have to join the channel to be able to add akick's?
If not, would ChanServ WHO-request work even if he did not join the channel? _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Oct 27, 2007 7:56 pm Post subject: |
|
|
On DALnet any SOp/AOp with access can trigger anything outside a channel simply by communicating with ChanServ.
Most channel founders therefore have verbose mode set as a precautionary measure. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Sat Oct 27, 2007 10:28 pm Post subject: |
|
|
yes i set the channel settings to verbose on so that the verbose on akick will notice by sop eggdrop when sop users adding akick  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Oct 28, 2007 8:13 am Post subject: |
|
|
A first draft, regular expressions might need tuning and other strange stuffs:
| Code: | bind notc - {[VERBOSE]* => akick * add *} check:akick
bind notc - {* has * access to * Reason:*} check:why
catch {unset akick:queue}
proc check:akick {nick host hand text {dest ""}} {
if {$dest == "" || [isbotnick $dest] || ![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
return
}
if {[regexp -- {^\[VERBOSE\] (.+?)!(.+?) => akick (.+?) add (.+?)$} [stripcodes bcruag $text] match tnick thost tchan tmask] && ![isbotnick $tnick]} {
set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]]) $tmask
putserv "CHANSERV WHY $tchan $tnick"
}
}
proc check:why {nick host hand text {dest ""}} {
if {![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
return
}
if {$dest == "" || [isbotnick $dest]} {
if {[regexp -- {^(.+?) has (SOp|AOp) access to (.+?)\. +Reason: Identification to the nickname (.+?)\. Channel Frozen: (YES|NO)$} [stripcodes bcruag $text] match tnick tacc tchan trnick tfrozen]} {
if {[info exists ::akick:queue] && [info exists ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]} {
putserv "CHANSERV AKICK $tchan DEL [set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]"
puthelp "PRIVMSG $tnick :Only Founder may add AKICK's to $tchan"
unset ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])
}
}
}
}
|
Edit:
Fixed bogus bindings and variable-name issues.
Edit:
Tuning of regular expression.
Edit:
Updated hostmask-check of chanserv.
Also added some debug-logging.
Edit:
Fixed missing close-brackets in check:why
Edit:
Used static AOP rather than $tacc. Could be fixed to SOp instead.
Edit:
Code modified to remove the AKICK rather than remove the SOp access from the evil SOp.
Edit:
Minor typo fixed.
Edit:
Had to dump the list-queue in favor of arrays.
Edit:
Sync'd with the debug-version on page 3.
Adjusted regular expression to not include trailing .
Edit:
Now matching multiple spaces after the channelname. _________________ NML_375, idling at #eggdrop@IrcNET
Last edited by nml375 on Fri Dec 07, 2007 1:59 pm; edited 18 times in total |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Oct 28, 2007 8:49 am Post subject: |
|
|
See one issue already, this will react on both AOP's and SOP's :/
Thinking of changing WHO-lookup into a ACC-lookup.. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Oct 28, 2007 6:49 pm Post subject: |
|
|
| nml375 wrote: | See one issue already, this will react on both AOP's and SOP's :/
Thinking of changing WHO-lookup into a ACC-lookup.. |
Below are DALnet's access levels:
| Quote: | -2 = Channel is frozen or closed
-1 = AutoKICKed from the channel
0 = basic
1 = AutoOp
2 = SuperOp
3 = Has founder access via a NickServ access list mask
4 = Has founder access via identification to NickServ
5 = Has founder access via identification to ChanServ |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Fri Nov 02, 2007 12:49 am Post subject: |
|
|
hi nml375 when i load the script i got this error --->
[22:44] Tcl error in file 'eggdrop.conf':
[22:44] bad type, should be one of:
while executing
"bind - notc {[VERBOSE]* => akick * add *} check:akick " |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Fri Nov 02, 2007 10:18 am Post subject: |
|
|
Oops. Apparently I switched the order of arguments in the bindings. Fixed now. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
Sydneybabe Op
Joined: 27 Apr 2007 Posts: 106 Location: Philippines
|
Posted: Sat Nov 03, 2007 12:38 am Post subject: |
|
|
| hi nml375 i load the script and on the partyline this is the message [22:36] Tcl error [check:akick]: can't read "::akick": no such variable |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Nov 03, 2007 11:04 am Post subject: |
|
|
Various issues with variable-names should be fixed now. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|