| View previous topic :: View next topic |
| Author |
Message |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Tue Nov 20, 2007 10:02 am Post subject: Protected nick |
|
|
Does anyone got an idea there is any script for Nick protected ?
Example :-
* ABC Join #
*Bot kick ABC out of the # ( ABC nick is an register nick OP in this channel . Pls /nick <nick> to change )
Question,
Can i have More nick to be added for this protection?
Will the bot kick on real nick owner ??
Regards |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Tue Nov 20, 2007 7:30 pm Post subject: |
|
|
Do you want this to go with on whats in the bots userfile? like use there handle as there nickname. And if they use that handle as the nickname and there hostmask dosen't match, It bans them? That sort of thing. I have seen a script that dose something like this, thou so far i've been unable to find it. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Wed Nov 28, 2007 12:56 am Post subject: |
|
|
Well, just wanna to get those +o +v +f nick to be protected and not to be clone by others.
Example : One of the OP nick is @moon
and there is a new user enter with the nick moon_456
Can there be a script to scan for those onjoin and /nick change into a protected nick as above with a warn and will kb !*moon_456*@* within a period of time which user refuse to change.
*moon_456 enter #
<bot>Hey moon_456 , your nick is smiliar to an recognise OP in this channel. If u are the owner of the nick Pls identify through the nickserv or /nick <newnick> to change or i got to remove you.
**<bot>Kick moon_456 has been kick out from the channel ( You have been warnned. Pls /nick <newnick> and rejoin )
*** <bot> set ban !*moon_456*@*
regard |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Wed Nov 28, 2007 5:10 am Post subject: |
|
|
Thanks. do you have some way of checking that the nickname is registered or not? like a raw numeric from the irc server in the /whois out put. Other wise its probably going to kick/ban them unless they change there nickname or leave the channel.  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Wed Nov 28, 2007 8:43 am Post subject: |
|
|
Maybe a +f +o flag to be excuse ? a identify through nickserv will auto get a +o +v +f in the bot userlist
Regard |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Nov 29, 2007 2:00 am Post subject: |
|
|
Not really tested this, so you'll have to let me know how it gose when ya use it. | Code: | ##
# chkopc.tcl
##
# Number of seconds before the bot will kick and ban the nickname that matches an ops?
set chkopc_time "120"
# Warning message to post to the nickname in the channel, that matches an ops nickname?
set chkopc_warnmsg ""
# Same as above. Only this will be used as the kick reason.
set chkopc_kickmsg ""
#Note: Please remenber to escape 'special chars' in the warnings and kick messages.
proc join:chkopc {nick host handle channel} {
global botnick chkopc_warnmsg chkopc_kickmsg chkopc_time
if {$nick == $botnick} {return}
if {[validuser [nick2hand $nick]] && [matchattr [nick2hand $nick] +fov|+fov $channel]} {return}
if {![validuser [nick2hand $nick]] || ![matchattr [nick2hand $nick] +fov|+fov $channel]} {
foreach target [chanlist $channel] {
if {[validuser [nick2hand $target]] && [matchattr [nick2hand $target] +fov|+fov $channel] && [onchan $target $channel]} {
if {[string match -nocase "*$target*" "$nick"]} {
puthelp "PRIVMSG $channel :$nick, $chkopc_warnmsg"
utimer $chkopc_time "putserv {KICK $channel $nick $chkopc_kickmsg}"
utimer $chkopc_time "putserv {MODE $channel +b $nick!*@*}"
return
}
}
}; return
}
}
proc nick:chkopc {nick host handle channel newnick} {
global botnick chkopc_warnmsg chkopc_kickmsg chkopc_time
if {$nick == $botnick} {return}
if {[validuser [nick2hand $nick]] && [matchattr [nick2hand $nick] +fov|+fov $channel]} {return}
if {![validuser [nick2hand $nick]] || ![matchattr [nick2hand $nick] +fov|+fov $channel]} {
foreach target [chanlist $channel] {
if {[validuser [nick2hand $target]] && [matchattr [nick2hand $target] +fov|+fov $channel] && [onchan $target $channel]} {
if {[string match -nocase "*$target*" "$nick"] && [string match -nocase "*$target*" "$newnick"]} {
putquick "KICK $channel $newnick $chkopc_kickmsg"
putquick "MODE $channel +bb $newnick!*@* $nick!*@*"
foreach ut [utimers] {
if {[string match "**$nick**" [join $ut]]} {
killutimer [lrange $ut end end]
}
}; return
}
if {[string match -nocase "*$target*" "$newnick"]} {
puthelp "PRIVMSG $channel :$newnick, $chkopc_warnmsg"
utimer $chkopc_time "putserv {KICK $channel $newnick $chkopc_kickmsg}"
utimer $chkopc_time "putserv {MODE $channel +b $newnick!*@*}"
return
}
if {[string match -nocase "*$target*" "$nick"]} {
foreach ut [utimers] {
if {[string match "**$nick**" [join $ut]]} {
killutimer [lrange $ut end end]
}
}; return
}
}
}; return
}
}
proc part:chkopc {nick host handle channel {msg ""}} {
global botnick
if {$nick == $botnick} {return}
if {[validuser [nick2hand $nick]] && [matchattr [nick2hand $nick] +fov|+fov $channel]} {return}
if {![validuser $handle] || ![matchattr $handle +fov|fov $channel]} {
foreach target [chanlist $channel] {
if {[validuser [nick2hand $target]] && [matchattr [nick2hand $target] +fov|+fov $channel] && [onchan $target $channel]} {
if {[string match -nocase "*$target*" "$nick"]} {
foreach ut [utimers] {
if {[string match "**$nick**" [join $ut]]} {
killutimer [lrange $ut end end]
}
}
}
}
}; return
}
}
bind join - "* *" join:chkopc
bind nick - "* *" nick:chkopc
bind part - "* *" part:chkopc
putlog "loaded chkopc.tcl --"
return | Should hopefully do the trick. Dont worrie about it warning then kicking and banning the nickname. It will only ban them after the set time if they dont change there nickname or part the channel.
[update #1] Added checks for and settings for netsplits.
[update #2] Fixed mising flag check on join proc.
[update #3] Done some testing. fixed alot of errors. removed some code. _________________ TCL the misunderstood
Last edited by TCL_no_TK on Sat Dec 01, 2007 4:56 am; edited 2 times in total |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Thu Nov 29, 2007 9:08 am Post subject: |
|
|
I m sorry. I have loaded the script and restart the bot. It seen nothing happen while i get an OP nick to enter the channel. Even tat goes for a /nick OPnick change.
Everything seen to be loaded |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Nov 29, 2007 10:08 am Post subject: |
|
|
Check that they aren't recognized as a bot user and have the +fov flag globally or on the channel. Updated it just now to fix a missing flag check on the join proc. sorry about that, didn't see it when i was doing it. _________________ TCL the misunderstood |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Thu Nov 29, 2007 11:31 am Post subject: |
|
|
reloaded , it seen nothing happen ..hmm
btw , wat ya mean by Check that they aren't recognized as a bot user ?
Regard |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Nov 29, 2007 5:31 pm Post subject: |
|
|
| fls wrote: | | btw , wat ya mean by Check that they aren't recognized as a bot user ? |
You're joking?
If they're in the bots user list they're ignored.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Thu Nov 29, 2007 8:39 pm Post subject: |
|
|
its all in the bot userlist for those .adduser
getting in with a diff nick/ident and in using the OP nick and there isnt any response for the bot. anything i in missing ?
Regard, |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Thu Nov 29, 2007 9:01 pm Post subject: |
|
|
They would need a differant hostmask (*!ident@*.host) from the one in the bots userfile, the user record for the nickname (aka. the op nickname). The only way it would do anything to someone that has been added to the bot is if they didn't have the flags +f +o or +v global or on the channel. They would just keep getting warned and ban after the set time. If the script didn't exempt the flags (+f +o or +v). Check the .channel <#name> output from DCC/Chat on the bots partyline it should show you all the users and there flags on the given channel <#name>. P.S want me to remove the global flag exempt incase you have some kinda of login or id system that gives them the flags for that channel, while they still have there global flag or flag(s)? _________________ TCL the misunderstood |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Fri Nov 30, 2007 10:28 am Post subject: |
|
|
It seen there isnt any happen when i get someone to try on it with diff ident , hostmask.
any clue ?
Regard |
|
| Back to top |
|
 |
TCL_no_TK Owner

Joined: 25 Aug 2006 Posts: 509 Location: England, Yorkshire
|
Posted: Fri Nov 30, 2007 10:46 pm Post subject: |
|
|
I'll add it one of ma bots and do some testing on it then. It shouldn't tak longer than a day or two. Sorry to make ya wait.
Edit: I've rushed it and done some tested fixed alot of things. And it should work fine now, the code could probably do with alot of improving. And i've also removed the split code and stuff, since i wasn't able to test it.
Should work now, if ya do have any problems with it. Please make an other post and i'll look at it again. Be sure to let me know how it gose, cos am started to like this script  _________________ TCL the misunderstood |
|
| Back to top |
|
 |
fls Voice
Joined: 17 Oct 2007 Posts: 35
|
Posted: Sat Dec 01, 2007 6:25 am Post subject: |
|
|
First , my apologise for the trouble tat caused your inconvenience. Tks u
Well, It seen working fine. But, there is some error listed
It protect only for the bot nick itself. And i change nick to others +o +n +v nick the bot did nothing.
Regard, |
|
| Back to top |
|
 |
|