| View previous topic :: View next topic |
| Author |
Message |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Wed Jan 31, 2007 2:00 pm Post subject: Ban every one that has noidentd tcl help |
|
|
This dose nothing i want it to ban every one that has no ident, can some one help thx.
| Code: |
set yourchan "#channel"
bind join - * badident
proc badident {nick uhost hand chan} {
if {![isbotnick $nick] && [botisop $chan]} {
if {"$uhost" == "*!*~*@*"} {
putserv "MODE $yourchan +b $uhost"
putserv "KICK $yourchan $nick :Sorry but you have no identd. Ident must be enabled to join, try opening port 113 on your router to your PC and reconnect to a server!"
}
}
}
|
|
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Wed Jan 31, 2007 2:15 pm Post subject: |
|
|
use string match instead.
| Code: | | if {[string match ~*@* $uhost]} { |
|
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Thu Feb 01, 2007 4:03 am Post subject: |
|
|
Ok that worked, Hmm when some one joins another channel it bans them in the channel i have the script on.
| Code: |
set yourchan "#channel"
set noflagban "fmo|omf"
setudef int banid
set tempban 10
bind join - $yourchan* badident
proc badident {nick uhost hand chan} {
global yourchan noflagban tempban
if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $noflagban $chan]) && ([onchan $nick $chan])} {
set count "[expr [channel get $chan banid] + 1]"
channel set $chan banid "$count"
if {[string match ~*@* $uhost]} {
putserv "MODE $yourchan +b $uhost"
putserv "KICK $yourchan $nick :Put kick msg here $count"
timer $tempban [putserv {MODE $yourchan -b $uhost}]
}
}
}
|
|
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Thu Feb 01, 2007 7:37 am Post subject: |
|
|
Try this:
Usage:
To enable: type .chanset #yourchan +noidentd in the partyline
To disable: type .chanset #yourchan -noidentd in the partyline
| Code: | set noidentd(excempt) "fmo|omf"
set noidentd(bantime) "30"; # Bantime in seconds
set noidentd(kickmsg) "You need identd enabled to join this channel - Count: :count:"
setudef flag noidentd
setudef int noidentd_id
bind join -|- {*} noidentd:join
proc noidentd:join {nick host hand chan} {
global noidentd
if {![channel get $chan noidentd]} { return }
if {![botisop $chan] && [matchattr $hand $noidentd(excempt) $chan] && [isop $nick $chan] && [isvoice $nick $chan]} { return }
channel set $chan noidentd_id "[set count [expr [channel get $chan noidentd_id] + 1]]"
regsub -all :count: $noidentd(kickmsg) $count reason
putserv "MODE $chan +b $host"
putserv "KICK $chan $nick :$reason"
utimer $noidentd(bantime) [list pushmode $chan -b $host]
} |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Thu Feb 01, 2007 1:38 pm Post subject: |
|
|
Looks like tosser still doesn't exactly know what he's doing.
| Code: |
set noident(exempt) "fmo|omf"
set noident(bantime) 10; # Ban time in minutes. (I see no reason to ban for mere seconds)
set noident(kickmsg) "You need identd enabled to join this channel."
# I don't see the point in some lame counter so let's not include it.
setudef flag noident
bind join -|- * noident:join
proc noident:join {nick host hand chan} {
global noident
if {![botisop $chan] || ![channel get $channel noident] || [matchattr $hand $noident($exempt) $chan] || ![string match ~*@* $host]} { return 0 }
putserv "MODE $chan +b [set host *![string map [list "~" "*"] $host]]"
putserv "KICK $chan $nick :$noident(kickmsg)"
timer $noidentd(bantime) [list pushmode $chan -b $host]
} |
Also, You would find that tossers code would not have worked very well as he doesn't even check the ident.
Enable it with .chanset #channel +noident.
It should work exactly as wanted  |
|
| Back to top |
|
 |
sdays Halfop
Joined: 21 Oct 2006 Posts: 98
|
Posted: Fri Feb 02, 2007 8:36 am Post subject: |
|
|
| hmm i tryed editing the bot bans the ops friends etc none of them codes works... |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Fri Feb 02, 2007 1:58 pm Post subject: |
|
|
| You need to restart the bot. |
|
| Back to top |
|
 |
|