| View previous topic :: View next topic |
| Author |
Message |
martpen69 Voice
Joined: 20 Jun 2005 Posts: 32
|
Posted: Mon Aug 29, 2005 3:13 pm Post subject: ctcp reply to channel |
|
|
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Aug 30, 2005 2:13 pm Post subject: |
|
|
| Code: | 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"
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
martpen69 Voice
Joined: 20 Jun 2005 Posts: 32
|
Posted: Fri Sep 02, 2005 12:20 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Sep 02, 2005 12:48 pm Post subject: |
|
|
I don't see why it shouldn't work
| Quote: | .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. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Sat Sep 03, 2005 2:11 am Post subject: |
|
|
| Maybe there is a channel mode blocking it. |
|
| Back to top |
|
 |
martpen69 Voice
Joined: 20 Jun 2005 Posts: 32
|
Posted: Sat Sep 03, 2005 5:54 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Sep 03, 2005 6:13 pm Post subject: |
|
|
Ahh, my bad. Replace
| Code: | | bind join - ask:version |
with
| Code: | | bind join - * ask:version |
Didn't it give you an error when you loaded it? :/ _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
martpen69 Voice
Joined: 20 Jun 2005 Posts: 32
|
Posted: Sat Sep 03, 2005 7:02 pm Post subject: |
|
|
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
 |
|
| Back to top |
|
 |
|