| View previous topic :: View next topic |
| Author |
Message |
silverboy Halfop
Joined: 11 Feb 2006 Posts: 55
|
Posted: Tue Feb 21, 2006 7:26 am Post subject: little help again lock chan |
|
|
i have edited the partquit.tcl so that it would ban thru X... can nyone help me how to make it lock the chan for 60 secs
| Code: | if {($partquitpunish == 1)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
if {($partquitpunish == 2)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
if {($partquitpunish == 3)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 } |
how do i put these lines.. hav no idea can anyone help me ??
putquick "MODE $chan +mr" -next
utimer 60 [list putquick "MODE $chan -mr" -next] [/code] |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Feb 21, 2006 8:23 pm Post subject: |
|
|
| Code: | set lock_modes "mr"
utimer 60 [list chan:unlock $chan]
##
# unlock
proc chan:unlock {chan} {
set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
putquick "MODE $chan -$::lock_modes" -next
}
return
}
### End ### |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Tue Feb 21, 2006 11:40 pm Post subject: |
|
|
| Alchera wrote: | | Code: | set lock_modes "mr"
utimer 60 [list chan:unlock $chan]
##
# unlock
proc chan:unlock {chan} {
set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
putquick "MODE $chan -$::lock_modes" -next
}
return
}
### End ### |
|
applying in Annual Obfuscated Tcl Code Contest?  _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Wed Feb 22, 2006 12:04 am Post subject: |
|
|
Might do.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
silverboy Halfop
Joined: 11 Feb 2006 Posts: 55
|
Posted: Thu Feb 23, 2006 6:11 am Post subject: |
|
|
I have put it like this but it doesnt work lol
| Code: | proc partquit:ban {nick chan uhost} {
global botnick partquitkick partquitkickmsg partquitpunish partquitbanmask partquitbantime
set banmask [partquit:banmask:type $nick!$uhost $partquitbanmask]
if {($partquitbantime == 0) || ($partquitbantime < 1) || ($partquitbantime == "")} { set partquitbantime 60 }
if {($partquitkick == 2) && ($partquitkickmsg == "")} { set partquitkickmsg "" }
if {($partquitkick == 1)} { set partquitkickmsg "0,1Part/Quit Flood1,0 - 2Unwanted characters ,2specific words, control codes 2long messages" }
if {($partquitpunish == 1)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
if {($partquitpunish == 2)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
if {($partquitpunish == 3)} { putserv "PRIVMSG X :ban $chan *!*@[lindex [split $uhost @] 1] $partquitkickmsg"; return 0 }
set lock_modes "mr"
utimer 60 [list chan:unlock $chan]
##
# unlock
proc chan:unlock {chan} {
set tmp [split [string trim [lindex [split [getchanmode $chan]] 0] "+"] ""]
if {[regexp -all [join [split $::lock_modes ""] "|"] $tmp] == [string length $::lock_modes]} {
putquick "MODE $chan -$::lock_modes" -next
}
return
} |
|
|
| Back to top |
|
 |
|