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.

ctcp reply to channel

Old posts that have not been replied to for several years.
Locked
m
martpen69
Voice
Posts: 32
Joined: Mon Jun 20, 2005 3:56 pm

ctcp reply to channel

Post by martpen69 »

Was looking for a script that would request ctcp version from users joining my net (on oper bot) and putting the results into a channel. To later use in my stats program.

Thanks :D
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 relaychan #chan

bind join - ask:version
bind ctcr - VERSION relay:vreply

proc ask:version {nick uhost hand chan} {
 puthelp "privmsg $nick :\001VERSION\001"
}

proc relay:vreply {nick uhost hand dest kw arg} {
 puthelp "privmsg $::relaychan :VERSION reply from $nick is: $arg"
}
m
martpen69
Voice
Posts: 32
Joined: Mon Jun 20, 2005 3:56 pm

Post by martpen69 »

thanks for the code i have not been able to get it to run though. the egg says its loaded but it wont send a version request or report to channel.

thanks
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I don't see why it shouldn't work
.tcl bind ctcr - VERSION bla; proc bla {n u h d kw a} { putlog "VERSION from $n is: $a" }
Tcl:
.tcl puthelp "privmsg opposing :\001VERSION\001"
Tcl:
VERSION from Opposing is: mIRC v6.16 Khaled Mardam-Bey
Probably the nick is not replying for the version request in your case.
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Maybe there is a channel mode blocking it.
m
martpen69
Voice
Posts: 32
Joined: Mon Jun 20, 2005 3:56 pm

Post by martpen69 »

ive put this code into a tcl called r.tcl and loaded it ive added the line at the end just to make sure it loads.

set relaychan #info

bind join - ask:version
bind ctcr - VERSION relay:vreply

proc ask:version {nick uhost hand chan} {
puthelp "privmsg $nick :\001VERSION\001"
}

proc relay:vreply {nick uhost hand dest kw arg} {
puthelp "privmsg $::relaychan :VERSION reply from $nick is: $arg"
}

putlog "ctcp reply by Opposing - Loaded."

the channel #info in unregged and so has no channel modes set.

If i start another client and join my net i dont get a version request from the bot.

Maybe its me im not doing something right or is there a command to activate it. I have been trying i made a fresh egg to run it on just incase it was conflicting with another tcl on the egg but still nothing.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Ahh, my bad. Replace

Code: Select all

bind join - ask:version
with

Code: Select all

bind join - * ask:version
Didn't it give you an error when you loaded it? :/
m
martpen69
Voice
Posts: 32
Joined: Mon Jun 20, 2005 3:56 pm

Post by martpen69 »

wooohooo

Thank you very much its all good.

It didnt give no errors before no but i have changed my console settings so maybe thats why. But thanks for sticking with it.

Much appreciated

Thanks again

:D :D :D
Locked