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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

also, you do a /msg X :verify nick or whatever to check what X replies to you (notice) so we can create a notice bind based on that reply.
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

Post by laynuks »

user wrote:
laynuks wrote:bot script will execute the line putserv "PRIVMSG X :kick $nick" and kick the op right?
X will do the kicking, not the bot (:P), and it needs to know what channel you want to kick the person from (/msg X KICK <#channel> <nick> <reason>)
<-- i tested this nd put a #channel and it works :)
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

Post by laynuks »

Sir_Fz wrote:also, you do a /msg X :verify nick or whatever to check what X replies to you (notice) so we can create a notice bind based on that reply.
<-- hello here it is

notice reply in Mirc
/msg x verify Johnny
[00:49] -X- Johhny!who@aol.com is logged in as secret89


notice reply in eggdrop via telnet
.msg x verify Johhny
Msg to x: verify Johhny
[00:49] -X (cservice@undernet.org)- Johhny!who@aol.com is logged in as secret89


/whois johhny
Johnny is who@aol.com
Johnny on #love


"the 2nd line is the reply from x when i do the /msg s verify nick"
So we need a notice bind for the 2nd stage of the scriptto work i guess

Thank You

==============================================


#first stage
bind kick - * kick:remove

proc kick:remove { nick uhost hand chan targ rsn } {
if {$targ == $::botnick} {
putserv "PRIVMSG X :verify $nick"
}
}


#2nd stage
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]"
}
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

set thechannel "#channel"

bind kick - * kick:remove 

proc kick:remove { nick uhost hand chan targ rsn } { 
if {$targ == $::botnick && [string tolower $chan] == [string tolower $::thechannel]} { 
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]" 
 } 
}
this should do fine.
l
laynuks
Voice
Posts: 35
Joined: Tue May 06, 2003 4:09 pm

Post by laynuks »

Sir_Fz wrote:

Code: Select all

set thechannel "#channel"

bind kick - * kick:remove 

proc kick:remove { nick uhost hand chan targ rsn } { 
if {$targ == $::botnick && [string tolower $chan] == [string tolower $::thechannel]} { 
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]" 
 } 
}
this should do fine.
Hi Sir_Fz Thank You it works :)
last question how can I put multiple x commands in this script
PRIVMSG X :verify $nick <-- I wanna add 2 more x command like
"PRIVMSG X :ban $channel $nick" and
"PRIVMSG X :unban $channel $botname"

my point here is that after I verify the username then remove the access, at the same time I can ban the op that kick/ban the my bot using "PRIVMSG X :ban $channel $nick"
and unban the bot if it is banned from the channel using "PRIVMSG X :unban $channel $botname".

Thank You
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

It's impossible to send more than 1 msg to a single "user" on a line. With channel or user modes is something else.
Once the game is over, the king and the pawn go back in the same box.
Locked