This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
-
silverboy
- Halfop
- Posts: 55
- Joined: Sat Feb 11, 2006 5:44 am
-
Contact:
Post
by silverboy »
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: Select all
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]
-
Alchera
- Revered One
- Posts: 3344
- Joined: Mon Aug 11, 2003 12:42 pm
- Location: Ballarat Victoria, Australia
-
Contact:
Post
by Alchera »
Code: Select all
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
-
demond
- Revered One
- Posts: 3073
- Joined: Sat Jun 12, 2004 9:58 am
- Location: San Francisco, CA
-
Contact:
Post
by demond »
Alchera wrote:Code: Select all
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
-
Alchera
- Revered One
- Posts: 3344
- Joined: Mon Aug 11, 2003 12:42 pm
- Location: Ballarat Victoria, Australia
-
Contact:
Post
by Alchera »
Might do.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
-
silverboy
- Halfop
- Posts: 55
- Joined: Sat Feb 11, 2006 5:44 am
-
Contact:
Post
by silverboy »
I have put it like this but it doesnt work lol
Code: Select all
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
}