Code: Select all
set tnks(nicks) {} ;# a list of nicks to use (set to {} to disable this script) #
set tnks(inchan) "5" ;# how long the bot stays in channel/s (in minutes) #
set tnks(gone) "15" ;# how long the bot stays out of channel/s (in seconds) #
;# before joining again ( change nick before join ) #
## end settings ##
if {$tnks(nicks) eq ""} { return }
set tnks(nicks) [split $tnks(nicks)]
set tnks(next) 0
if {![info exists tnks(timer)]} {
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:join {chans} { global tnks nick altnick
if {$tnks(nicks) eq ""} { return }
set nick [lindex $tnks(nicks) $tnks(next)]
incr tnks(next)
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set altnick [lindex $tnks(nicks) $tnks(next)]
foreach ch $chans { channel set $ch -inactive }
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:part {} { global tnks botnick
if {$tnks(nicks) eq ""} { return }
if {$botnick ne $nick} { incr tnks(next) }
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set pchans ""
foreach ch [channels] {
if {[botonchan $ch]} { lappend pchans $ch ; channel set $ch +inactive }
}
set tnks(timer) [utimer $tnks(gone) [list tnks:join $pchans]]
}
Code: Select all
set tnks(nicks) {} ;# a list of nicks to use (set to {} to disable this script) #
set tnks(inchan) "5" ;# how long the bot stays in channel/s (in minutes) #
set tnks(gone) "15" ;# how long the bot stays out of channel/s (in seconds) #
;# before joining again ( change nick before join ) #
## end settings ##
if {$tnks(nicks) eq ""} { return }
set tnks(nicks) [split $tnks(nicks)]
set tnks(next) 0
if {![info exists tnks(timer)]} {
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:join {chans} { global tnks nick altnick
if {$tnks(nicks) eq ""} { return }
set nick [lindex $tnks(nicks) $tnks(next)]
incr tnks(next)
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set altnick [lindex $tnks(nicks) $tnks(next)]
foreach ch $chans { channel set $ch -inactive }
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:part {} { global tnks nick botnick
if {$tnks(nicks) eq ""} { return }
if {$botnick ne $nick} { incr tnks(next) }
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set pchans ""
foreach ch [channels] {
if {[botonchan $ch]} { lappend pchans $ch ; channel set $ch +inactive }
}
set tnks(timer) [utimer $tnks(gone) [list tnks:join $pchans]]
}
Code: Select all
# set a list of nicks to use (set to {} to disable this script) #
set tnks(nicks) {
nick1
nick2
anothernick
etc
} ;# end of set nicks #
# how long the bot stays in channel/s (in minutes) #
set tnks(inchan) "5"
# how long the bot stays out of channel/s (in seconds) before joining again ( change nick before join ) #
set tnks(gone) "15"
## end of settings ##
set tnks(tmls) [split [string trim $tnks(nicks)] "\n"]
set tnks(nicks) ""
foreach tnks(tmit) $tnks(tmls) {
set tnks(tmit) [string trim $tnks(tmit)]
if {$tnks(tmit) ne ""} { lappend tnks(nicks) $tnks(tmit) }
}
unset tnks(tmls) tnks(tmit)
if {$tnks(nicks) eq ""} { return }
set tnks(next) 0
if {![info exists tnks(timer)]} {
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:join {chans} { global tnks nick altnick
if {$tnks(nicks) eq ""} { return }
set nick [lindex $tnks(nicks) $tnks(next)]
incr tnks(next)
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set altnick [lindex $tnks(nicks) $tnks(next)]
foreach ch $chans { channel set $ch -inactive }
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:part {} { global tnks nick botnick
if {$tnks(nicks) eq ""} { return }
if {$botnick ne $nick} { incr tnks(next) }
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set pchans ""
foreach ch [channels] {
if {[botonchan $ch]} { lappend pchans $ch ; channel set $ch +inactive }
}
set tnks(timer) [utimer $tnks(gone) [list tnks:join $pchans]]
}
putlog "Nick-o-rama v1.1 Loaded."
Code: Select all
# set a list of nicks to use (set to {} to disable this script) #
set tnks(nicks) {
nick1
nick2
anothernick
etc
} ;# end of set nicks #
# how long the bot stays in channel/s (in minutes) #
set tnks(inchan) "5"
# how long the bot stays out of channel/s (in seconds) before joining again ( change nick before join ) #
set tnks(gone) "15"
## end of settings ##
set tnks(tmls) [split [string trim $tnks(nicks)] "\n"]
set tnks(nicks) ""
foreach tnks(tmit) $tnks(tmls) {
set tnks(tmit) [string trim $tnks(tmit)]
if {$tnks(tmit) ne ""} { lappend tnks(nicks) $tnks(tmit) }
}
unset tnks(tmls) tnks(tmit)
if {$tnks(nicks) eq ""} { return }
set tnks(next) 0
if {![info exists tnks(timer)]} {
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:join {chans} { global tnks nick altnick
if {$tnks(nicks) eq ""} { return }
set nick [lindex $tnks(nicks) $tnks(next)]
incr tnks(next)
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set altnick [lindex $tnks(nicks) $tnks(next)]
set tnks(timer) [utimer 4 [list tnks:dojoin $chans]]
}
proc tnks:dojoin {chans} { global tnks
if {$tnks(nicks) eq ""} { return }
foreach ch $chans { channel set $ch -inactive ; savechannels
putserv "JOIN $ch"
}
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
proc tnks:part {} { global tnks nick botnick
if {$tnks(nicks) eq ""} { return }
if {$botnick ne $nick} { incr tnks(next) }
if {$tnks(next)==[llength $tnks(nicks)]} { set tnks(next) 0 }
set pchans ""
foreach ch [channels] {
if {[botonchan $ch]} { lappend pchans $ch
channel set $ch +inactive ; savechannels
putserv "PART $ch :Leaving:)"
}
}
set tnks(timer) [utimer $tnks(gone) [list tnks:join $pchans]]
}
putlog "Nick-o-rama v1.1 Loaded."
Code: Select all
# set a list of nicks to use (set to {} to disable this script) #
set tnks(nicks) {
nick1
nick2
anothernick
etc
} ;# end of set nicks #
# how long the bot stays in channel/s (in minutes) #
set tnks(inchan) "2"
# how long the bot stays out of channel/s (in seconds) before joining again ( change nick before join ) #
set tnks(gone) "60"
## end of settings ##
set tnks(tmls) [split [string trim $tnks(nicks)] "\n"]
set tnks(nicks) ""
foreach tnks(tmit) $tnks(tmls) {
set tnks(tmit) [string trim $tnks(tmit)]
if {$tnks(tmit) ne ""} { lappend tnks(nicks) $tnks(tmit) }
}
unset tnks(tmls) tnks(tmit)
if {$tnks(nicks) eq ""} { return }
if {![info exists tnks(next)]} { set tnks(next) 0 }
if {![info exists tnks(timer)]} {
set tnks(timer) [timer $tnks(inchan) [list tnks:part]]
}
set tnks(inchan) [expr {($tnks(inchan)*60)-1}]
incr tnks(gone) -5
if {$tnks(gone)<"1"} { set tnks(gone) 1 }
set tnks(realnk) $nick
proc tnks:part {} { global tnks
if {$tnks(nicks) eq ""} { return }
set pchans ""
foreach ch [channels] {
if {[botonchan $ch]} { lappend pchans $ch
channel set $ch +inactive ; savechannels
putserv "PART $ch :Leaving:)"
}
}
set tnks(timer) [utimer $tnks(gone) [list tnks:chgnick $pchans]]
}
proc tnks:chgnick {chans} { global tnks nick altnick
if {$tnks(nicks) eq ""} { return }
set nick [lindex $tnks(nicks) $tnks(next)]
if {$tnks(realnk) ne ""} { set altnick $tnks(realnk) ; set tnks(realnk) "" }
putserv "NICK $nick"
incr tnks(next)
if {$tnks(next)>=[llength $tnks(nicks)]} { set tnks(next) 0 }
set tnks(timer) [utimer 4 [list tnks:chknick $chans]]
}
proc tnks:chknick {chans} { global tnks nick botnick
if {$tnks(nicks) eq ""} { return }
if {$botnick ne $nick} { tnks:chgnick $chans
} else { tnks:join $chans }
}
proc tnks:join {chans} { global tnks
if {$tnks(nicks) eq ""} { return }
foreach ch $chans { channel set $ch -inactive ; savechannels
putserv "JOIN $ch"
}
set tnks(timer) [utimer $tnks(inchan) [list tnks:part]]
}
putlog "Nick-o-rama v1.1 Loaded."