| View previous topic :: View next topic |
| Author |
Message |
F|irT Voice
Joined: 30 Apr 2015 Posts: 30 Location: Pakistan
|
Posted: Tue Sep 04, 2018 3:46 am Post subject: Help On This Issue... |
|
|
| Code: |
### Start editing variables from here onwards! ###
#Set the channel(s) you want this script active on.
#This script supports multiple channels.
#Usage: "#channel1 #channel2 #mychannel"
#(To activate on all channels use: "")
set badnickchans "#sukoon"
#Set the *bad ** for the script to react on.
#When users join a channel this script is activated
#and their nicks match this current world list,
#they will be kicked/banned. (wildcards "" are accepted)
#(Set/edit these words according to your needs)
#(I have already added some as examples)
set badnicks {
"maderchod"
"behanchode"
"randi"
"kanjer"
"dalla"
"bharwa"
"rape"
"ghasti"
}
#Set the flags for bot owners, masters, ops
#and users which to exempt from the script.
#(Usage: m, n, o, or "mnf", "fbo" etc)
set badnickexempt "mnof|mnof"
#For how long you wish (in minutes) to ban the
#user with the bad nick. (mins)
set badnicktime 10
#For how long you wish (in minutes) to ban the
#user with the bad nick. (mins)
set badnicktimer 5
### Don't edit anything else from this point onwards, even if you know tcl! ###
bind join - * join:badnick
proc join:badnick {nick host hand chan} {
global botnick badnicks badnickchans badnickexempt badnicktime badnicktimer
if {(([lsearch -exact [string tolower $badnickchans] [string tolower $chan]] != -1) || ($badnickchans == "*")) && ($nick != $botnick)} {
foreach badnick [string tolower $badnicks] {
set badnickban1 "*$badnick*!*@*"
set badnickban2 "*!*@[lindex [split $host @] 1]"
set usernick "[string trimleft [string tolower [lindex [split $host "@"] 0]] "~"]"
if {[string match *$badnick* [string tolower $nick]]} {
if {([botisop $chan]) && (![isop $nick $chan]) && (![isvoice $nick $chan]) && (![matchattr $hand $badnickexempt $chan]) && ([onchan $nick $chan])} {
putquick "MODE $chan +bb $badnickban1 $badnickban2"
putquick "KICK $chan $nick :10Bad Nick *$badnick* Type /nick New-Nick aNd rEjOiN ...! 5 mis ban"
timer $badnicktime "pushmode $chan -b $badnickban1"
timer $badnicktimer "pushmode $chan -b $badnickban2"
return 0
}
}
}
}
}
# (ain't i an asskicker?...)
putlog "Bad nick Kicker Script v1.65.ab by \002F|irT\002 -=Loaded=-"
putlog "*ENABLED* Bad nick Kicker Script on:\002 $badnickchans"
|
This is bad nick script wich is working good so far .. but there is some issue i can't see and fixit it like i never add incest nick or ident on this script in bad words but when ever user join with this nick .. this happend
| Quote: |
[12:30] * Joins: uhub (InCeSt@chan.stats.uk.to)
[12:30] * NoNSt0p sets mode: +b *!*@*
[12:30] * uhub was kicked by NoNSt0p (Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban)
[12:30] * Joins: uhub (InCeSt@chan.stats.uk.to)
[12:30] * NoNSt0p sets mode: +b *!*@*
[12:30] * uhub was kicked by NoNSt0p (Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban)
[12:30] * Joins: uhub (InCeSt@chan.stats.uk.to)
[12:30] * NoNSt0p sets mode: +b *!*@*
[12:30] * uhub was kicked by NoNSt0p (Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban)
[12:30] * Joins: uhub (InCeSt@chan.stats.uk.to)
[12:30] * NoNSt0p sets mode: +b *!*@*
[12:30] * uhub was kicked by NoNSt0p (Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban)
|
infact i add new channel Inc3st this happend..
| Quote: |
NoNSt0p banned *!*@* (+b)
11:28 AM ← HouseWife_RP (~HouseWife@49.206.12.52) was kicked by •NoNSt0p: Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban
11:29 AM •NoNSt0p un-banned *!*@* (-b)
11:29 AM •MaSt3r un-banned *!*@* (-b)
11:29 AM → Tamilan90 and Scorpionheart__ joined
11:29 AM •NoNSt0p banned *!*@* (+b)
11:29 AM ← Tamilan90 (~Mibbit@157.49.225.153) was kicked by •NoNSt0p: Bad Nick ** Type /nick New-Nick aNd rEjOiN ...! 5 mis ban
|
Can any one understand this and fix this issue it will be gr8 help .
Thanks. Regards.
F|irT.. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Thu Sep 06, 2018 3:55 am Post subject: |
|
|
| Code: |
namespace eval BadNick {
# Set the channel(s) you want this script active on.
# This script supports multiple channels.
# Usage: "#channel1 #channel2 #mychannel"
# (To activate on all channels use: "")
set bad(chans) "#sukoon"
# Set the *bad ** for the script to react on.
# When users join a channel this script is activated
# and their nicks match this current world list,
# they will be kicked/banned. (wildcards "" are accepted)
# (Set/edit these words according to your needs)
# (I have already added some as examples)
set bad(nicks) {"maderchod" "behanchode" "randi" "kanjer" "dalla" "bharwa" "rape" "ghasti"}
# Set the flags for bot owners, masters, ops
# and users which to exempt from the script.
# (Usage: m, n, o, or "mnf", "fbo" etc)
set bad(exempt) "mnof|mnof"
#For how long you wish (in minutes) to ban the
#user with the bad nick. (mins)
set bad(time) 10
#For how long you wish (in minutes) to ban the
#user with the bad nick. (mins)
set bad(timer) 5
# Set reason.
# %nick will be replaced with actual user name
# %time will be replaced with actual time you set at bad(time)
# %chan will be replaced with actual channel name
# %match will be replaced with what was actually matched
set bad(reason) "Bad nick %nick cos matches %match. Type '/nick NewNick' and rejoin... %time mins ban"
bind join - * [namespace current]::check
proc check {nick uhost hand chan} {
variable bad
if {[isbotnick $nick] || ![botisop $chan]} return
set match 0
if {$bad(chans) == "*" || [lsearch -nocase $bad(chans) $chan] > -1} {
if {[isop $nick $chan] || [isvoice $nick $chan] || [matchattr $hand $bad(exempt) $chan]} return
if {[scan $uhost {%[^@]@%s} user host] != 2} return
foreach n $bad(nicks) {
if {[string match -nocase "*$n*" $nick] || [string match -nocase "*$n*" $user]} {
lappend bans "$nick!*@*"
lappend bans "*!*@$host"
set word $n
incr match
break
}
}
}
if {$match} {
if {![onchan $nick $chan]} return
pushmode $chan +b [join $bans]
puthelp "KICK $chan $nick :[string map [list %nick $nick %time $bad(time) %chan $chan %match $word] $bad(reason)]"
utimer $bad(timer) [list [namespace current]::lift $chan $bans]
}
}
proc lift {chan bans} {
if {![botonchan $chan] || ![botisop $chan]} return
pushmode $chan -b [join $bans]
}
}
|
Give this untested code a try. _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|