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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
martpen69
Voice
Posts: 32 Joined: Mon Jun 20, 2005 3:56 pm
Post
by martpen69 » Sun Apr 16, 2006 8:23 pm
Oper bot to ctcp version people when they join my channel and to +v them if they reply with a certain version.
I found some scripts which ive taken bits from and tried to put them together.
Not sure if this is correct.
Code: Select all
bind ctcr - VERSION version:reply
bind join - * check:version
proc check:version {nick uhost hand chan} {
global cversion
set cversion([string tolower $nick]) 1
putserv "privmsg $nick :\001VERSION\001"
}
proc version:reply {nick uhost hand dest kw arg} {
global cversion
if {[isbotnick $dest] && [info exists cversion([string tolower $nick])]} {
if {[string match -nocase "*version here*" $arg]} {
{ pushmode $vchan +v $user }
unset cversion([string tolower $nick])
}
}
}
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Apr 16, 2006 8:36 pm
You're supposed to test it, not ask us if it works. Anyways
should be just
martpen69
Voice
Posts: 32 Joined: Mon Jun 20, 2005 3:56 pm
Post
by martpen69 » Sun Apr 16, 2006 9:11 pm
I didnt know how to set the $vchan variable so i did this.
Code: Select all
bind ctcr - VERSION version:reply
bind join - * check:version
proc check:version {nick uhost hand chan} {
global cversion
set cversion([string tolower $nick]) 1
putserv "privmsg $nick :\001VERSION\001"
}
proc version:reply {nick uhost hand dest kw arg} {
global cversion
if {[isbotnick $dest] && [info exists cversion([string tolower $nick])]} {
if {[string match -nocase "*mirc*" $arg]} {
pushmode #mychannel +v $nick
unset cversion([string tolower $nick])
}
}
}
Probably lame by your standards but it does the job.
Thanks again for the help.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Apr 17, 2006 4:27 am
Code: Select all
bind ctcr - VERSION version:reply
bind join - * check:version
proc check:version {nick uhost hand chan} {
global cversion
set cversion([string tolower $nick]) $chan
putserv "privmsg $nick :\001VERSION\001"
}
proc version:reply {nick uhost hand dest kw arg} {
global cversion
if {[isbotnick $dest] && [info exists cversion([set nick [string tolower $nick]])]} {
if {[string match -nocase "*mirc*" $arg]} {
pushmode $cversion($nick) +v $$nick
}
unset cversion($nick)
}
}
this will work on all chans.
CrazyEgg
Halfop
Posts: 47 Joined: Thu Jul 28, 2005 4:02 pm
Post
by CrazyEgg » Mon Apr 17, 2006 11:12 am
if the bot is at least voice then change
privmsg with CPRIVMSG
to prevent msg "target change too fast wait for xxx sec"
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Apr 17, 2006 12:00 pm
CPRIVMSG? What is that? Must be a server side feature, right?
Once the game is over, the king and the pawn go back in the same box.
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Apr 17, 2006 8:56 pm
4.7 CPRIVMSG
CPRIVMSG
The CPRIVMSG parameter indicates that the server supports the
"CPRIVMSG" command. An extension for the PRIVMSG command, as defined
in RFC 1459 [2] section 4.4.1, it allows users with a specific status
in a channel to issue a PRIVMSG command to a user within that
channel, free of certain restrictions a server MAY apply to PRIVMSG.
The CPRIVMSG parameter MUST NOT be specified with a value.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM