This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

hello I need a script that will remove access when

Old posts that have not been replied to for several years.
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

hello I need a script that will remove access when

Post by laynuks »

hello I need a script that will remove access when the abusive ops that kicks the bot by using /mode #channel kick botname
then the script will check for the username of the abusive op
/msg x verify AbusiveOpsNick

then the script will remove the access of the op

/msg x remuser #channel UsernameofOP



Thank You again

LAYNUKS
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

try this one:

Code: Select all

bind kick - "*" kick_remove

proc kick_remove {nick host hand chan target args} {
global botnick
if {$target == $botnick} {
putserv "PRIVMSG X :remuser $chan =$nick"
putlog "Removed $nick's username from X's $chan access list."
}
}
«A fantastic spaghetti is a spaghetti that does not exist»
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

What would you do if they used the /msg chanserv kick command?

Might be an idea to expand the script to do that?
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

well this's undernet. X is the service's nick.
but laynuks said that if a user uses /mode #channel kick $botnick
so I guess the code should be a mode bind like

Code: Select all

bind mode - "* kick"  kick_remove

proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG X :verify $nick"
##here we should find a way so the bot will catch the access of the nick##
putserv "PRIVMSG X :remuser #channel $verifiednick
  }
}
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

I'm not familiar with the undernet services, but you will need a second proc to catch the reply from the verify command.

Code: Select all

bind mode - "* kick"  kick_remove 

proc kick_remove {nick uhost hand chan mc victim} { 
  if {$victim == $::botnick} { 
    putserv "PRIVMSG X :verify $nick"
  } 
}

#I use bind notice since I don't know how X replies
bind notc - "bla bla bla *" check_verify

proc check_verify {nick host hand arg dest} {
  if {[string equal $dest $::botnick]} {
    #the index must probably be changed to match where in the line the verified nick is
    putserv "PRIVMSG X :remuser #channel [lindex [split $arg] end]"
  }
}
I hope this will give you an idea of what you need to do..
Elen sila lúmenn' omentielvo
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

thanks all

Post by laynuks »

to all scripters thanks a lot :)


laynuks
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

Post by laynuks »

Papillon wrote:I'm not familiar with the undernet services, but you will need a second proc to catch the reply from the verify command.

Code: Select all

bind mode - "* kick"  kick_remove 

proc kick_remove {nick uhost hand chan mc victim} { 
  if {$victim == $::botnick} { 
    putserv "PRIVMSG X :verify $nick"
  } 
}

#I use bind notice since I don't know how X replies
bind notc - "bla bla bla *" check_verify

proc check_verify {nick host hand arg dest} {
  if {[string equal $dest $::botnick]} {
    #the index must probably be changed to match where in the line the verified nick is
    putserv "PRIVMSG X :remuser #channel [lindex [split $arg] end]"
  }
}
I hope this will give you an idea of what you need to do..

Hello In Undernet before u can be given access u need to have a username from Cservice, so to be an op u need to login to X using ur unique username then u will get the @ op sign. In order to remove his access we need to check and verify what the op's username by doing.

Let say the Op's nickname is Pepsi1 and he kick the bot
In order to get the username of that OP we need to this command to get the username:
/msg x verify Pepsi1

then @X will respond via notice, and the output will say:
-X- Pepsi1!pirch@aol.com is logged in as Johnny2003


then to remove that username we do this command:
/msg x remuser #channel Johhney2003




I hope I elaborate in details how @X works in Undernet so u can adjust the tcl script.

Thank You Very Much

LAYNUKS
B
BiLL
Halfop
Posts: 78
Joined: Wed Sep 26, 2001 8:00 pm
Location: Germany

Post by BiLL »

Cant you do it ? ;)
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

tcl

Post by laynuks »

Bill I cant thats why I need help hehe
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

i think Papillon's code should work as u wanted it to.
did u try it ?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

set thechannel "#channel"
bind mode - "* kick"  kick_remove 

proc kick_remove {nick uhost hand chan mc victim} { 
  if {$victim == $::botnick} { 
    putserv "PRIVMSG X :verify $nick" 
  } 
} 

bind notc - "* logged in as *" check_verify 

proc check_verify {nick host hand arg dest} { 
  if {[string equal $dest $::botnick]} { 
    putserv "PRIVMSG X :remuser $::thechannel [lindex [split $arg] end]" 
  } 
}
It should work alright as it is now
Elen sila lúmenn' omentielvo
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

thanks papillion

Post by laynuks »

thanks a lot papillion, i will try it and let u know the result :)
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

hi papillion

Post by laynuks »

hi the script did not work hmmm i even tried first block and change verify to Kick but it did not work.... it seems that it is not catching the nick of the kicker when he does /kick #channel botname

set thechannel "#channel"
bind mode - "* kick" kick_remove

proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG X :kick $nick"
}
}
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

man, u said u want it to work when someone does /mode #channel kick botname.
anyway add this code to make the bot work on /kick #channel botname.

Code: Select all

bind kick - * kick:remove

proc kick:remove { nick uhost hand chan targ rsn } {
  if {$targ == $::botnick} {
   putserv "PRIVMSG X :verify $nick"
   }
}
note:do not remove Papillon's code, leave it and add this one into it.
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

thank you

Post by laynuks »

Sorry for the misunderstanding I mean /kick #channel nick and
Thank You Sir_Fz I will try this :) I will let u know if it works
Locked