egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

bot remove the akick and founder only allowed to add akick..
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Wed Oct 24, 2007 12:03 am    Post subject: bot remove the akick and founder only allowed to add akick.. Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Oct 24, 2007 7:22 am    Post subject: Reply with quote

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
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Thu Oct 25, 2007 12:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Oct 25, 2007 9:24 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Fri Oct 26, 2007 11:30 pm    Post subject: Reply with quote

yes Alchera Smile i hope someone can help me regarding this thanks a lot in advance. Very Happy
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Oct 27, 2007 9:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Oct 27, 2007 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Sat Oct 27, 2007 10:28 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Oct 28, 2007 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sun Oct 28, 2007 8:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Oct 28, 2007 6:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Fri Nov 02, 2007 12:49 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Nov 02, 2007 10:18 am    Post subject: Reply with quote

Oops. Apparently I switched the order of arguments in the bindings. Fixed now.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Sat Nov 03, 2007 12:38 am    Post subject: Reply with quote

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
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Sat Nov 03, 2007 11:04 am    Post subject: Reply with quote

Various issues with variable-names should be fixed now.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber