| View previous topic :: View next topic |
| Author |
Message |
michalis Voice
Joined: 01 Jul 2007 Posts: 1
|
Posted: Sun Jul 01, 2007 10:50 am Post subject: ctcp no version reply help |
|
|
Hello, i found this code for my needs, i just want your help making this code to ban/kick users that dont reply on bots ctcp version not to voice them
| Code: |
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)
}
}
|
Thanks, Michalis |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Mon Jul 09, 2007 7:57 am Post subject: |
|
|
This should do the job for you. It will VERSION the user on join and if there is no version reply from the user within 15secs, then it will go ahead and kick/ban that user from the channel.
| Code: |
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"
utimer 15 [list no:version:reply $nick $uhost $chan]
}
proc version:reply {nick uhost hand dest kw arg} {
global cversion
if {[info exists cversion([string tolower $nick])]} {
unset cversion([string tolower $nick])
}
}
proc no:version:reply {nick uhost chan} {
global cversion
if {[info exists cversion([string tolower $nick])] && [onchan $nick $chan]} {
putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putserv "KICK $chan $nick :No CTCP version reply"
unset cversion([string tolower $nick])
}
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
PeLL Voice
Joined: 04 Mar 2011 Posts: 12 Location: spain
|
Posted: Thu Feb 28, 2019 4:55 pm Post subject: |
|
|
It works very well
Can you add to ignore idents?
Large channel much lag.
Thank you . |
|
| Back to top |
|
 |
Dominatez Halfop

Joined: 14 Jan 2019 Posts: 46 Location: United Kingdom
|
Posted: Thu Mar 07, 2019 4:05 pm Post subject: |
|
|
I am getting the following error.
Tcl error [ctcpvers]: can't read "::verschan": no such variable |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Mar 08, 2019 2:31 am Post subject: |
|
|
You two realize this is an old topic? Open a new topic and link to this if you really have to and let this one rest in the Archives.
@PeLL If you add 'ignore idents' on a large channel you will have a huge ignore list in no time. What do you want to achieve? What's the issue?
@Dominatez : The error you get has nothing to do with this since there's no ctcpvers function nor verschan is used in here. Look in your other scripts. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
PeLLq Voice
Joined: 24 Apr 2019 Posts: 2
|
Posted: Fri Apr 26, 2019 12:06 pm Post subject: |
|
|
Hello greetings.
I am looking for a TCL that can make ctcp version on connect.
And if you can ignore webchat or webchat user modes. |
|
| Back to top |
|
 |
simo Owner
Joined: 22 Mar 2015 Posts: 941
|
Posted: Sat Apr 27, 2019 4:58 pm Post subject: |
|
|
| so ur bot is opered ? |
|
| Back to top |
|
 |
PeLLq Voice
Joined: 24 Apr 2019 Posts: 2
|
Posted: Sat Apr 27, 2019 6:04 pm Post subject: |
|
|
if right.
Thank you very much for answering |
|
| Back to top |
|
 |
Dominatez Halfop

Joined: 14 Jan 2019 Posts: 46 Location: United Kingdom
|
Posted: Tue Apr 30, 2019 5:20 pm Post subject: |
|
|
I would set the utimer to maybe 30 or even 45 seconds as some people connecting to a network may experience lag between themselves and the bot, and if no version was received or late received, it would kick and ban the user for that.
Might be a better idea for the bot to message a channel op on kick letting them know that this user was kicked and when for ctcp. |
|
| Back to top |
|
 |
|