| View previous topic :: View next topic |
| Author |
Message |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Fri Aug 20, 2010 2:16 pm Post subject: Adding a Ban Text |
|
|
Hello. I wanted to ask if u could help me, adding a Text for the User (Ban -message) and a Channel Output , if somebody gets banned by flyby (e.g.: banned by flyby Channel). atm its just the ban and the user and the chan does not know why he/she gets banned. Thanks a lot
| Code: | ####################################################
# by wiebe @ QuakeNet
#
####################################################
setudef flag flyby
setudef int flyby-trigger
setudef int flyby-bantime
####################################################
# flyby:part
####################################################
bind part -|- * flyby:part
proc flyby:part { n u h c {m ""}} {
if {![validchan $c]} { return 0 }
if {[isbotnick $n]} { return 0 }
if {![botisop $c]} { return 0 }
if {![channel get $c flyby]} { return 0 }
if {[matchattr $h bfvlomn|fvlomn $c]} { return 0 }
if {[isop $n $c]} { return 0 }
if {[ishalfop $n $c]} { return 0 }
if {[isvoice $n $c]} { return 0 }
if {[matchban $n!$u $c]} { return 0 }
set t [channel get $c flyby-trigger]
if {$t < 0} { set t 10; channel set $c flyby-trigger $t }
set d [expr [clock seconds] - [getchanjoin $n $c]]
if {$d > $t} { return 0 }
set l [channel get $c flyby-bantime]; set e "flyby.tcl"
if {$l < 5} { set l 10; channel set $c flyby-bantime 10 }
set m "*!$u"; set r "You joined and left within a very short time."
if {[string match "~*@*" $u] || [string match "*.users.quakenet.org" $u]} {
set m "*!*@[lindex [split $u @] 1]"
}
if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
} else { newchanban $c $m $e $r $l }
}
set scriptdb(flyby) {
"ban users who part shortly after joining, +flyby (enable), flyby-trigger (ban if user parts within X seconds), flyby-bantime (ban for X minutes)"
} |
|
|
| Back to top |
|
 |
doggo Halfop
Joined: 05 Jan 2010 Posts: 97
|
Posted: Sun Aug 22, 2010 7:22 pm Post subject: |
|
|
| Code: | if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
} else { newchanban $c $m $e $r $l }
}
|
try changing to
| Code: | if {![string equal [info procs newchanban:ban] ""]} { newchanban:ban $c $m $e $r $l]
puthelp "privmsg $n : YOUR MSG HERE"
} else { newchanban $c $m $e $r $l }
}
|
should send the nick that was banned a privmsg, just change YOUR MSG HERE to your own  _________________ NON geeky!! http://gotcode4u.com/ |
|
| Back to top |
|
 |
Fraud Op
Joined: 19 May 2008 Posts: 101
|
Posted: Mon Aug 23, 2010 5:23 pm Post subject: |
|
|
| Hello doggo. Thanks, working |
|
| Back to top |
|
 |
|