i need my Eggdrop Part channel every10 minutes and chnage his nick and then join chnnel back after staying 10 mniutes Part the channel come with a new nick so on every 10 mint Part #channel Chnage $nick join #channel back
if Possible Please code it forme i highly Apprecaite.
# nick.tcl
# parts a preconfigured channel at a specified frequency for a specified length of time
# chooses a new nick from a preconfigured list on each occasion it parts
# this script MUST be activated with a restart (not a rehash)
# the bot will come online with its normal primary nick as set in the .conf file
# the first nick change occurs after the first scheduled part
# set here the single channel name the bot parts
set vNickChannel #eggtcl
# set here the list of nicks the bot will use
# nicks should be unregistered and not already in use
set vNickList {
testbot12345
testbot23456
testbot34567
testbot45678
testbot56789
}
# set here how the bot selects the next nick from the list
# sequentially (1) or randomly (2)
set vNickMode 2
# set here the frequency in minutes for parting the channel
set vNickFrequency 3
# set here the length of time in seconds the bot parts for
# suggested minimum is 10 seconds, allowing bot to change nick before rejoining
set vNickAbsent 30
bind EVNT - init-server pNickStart
proc pNickStart {type} {
global vNickFrequency
if {[string is integer -strict $vNickFrequency]} {
if {$vNickFrequency > 0} {
pNickSchedule
}
}
return 0
}
proc pNickSchedule {} {
global vNickFrequency
foreach schedule [binds TIME] {
if {[string equal pNickPart [join [lindex $schedule 4]]]} {
set minute [join [lindex [lindex $schedule 2] 0]]
set hour [join [lindex [lindex $schedule 2] 1]]
unbind TIME - "$minute $hour * * *" pNickPart
}
}
set minute [strftime %M [expr {[unixtime] + ($vNickFrequency * 60)}]]
set hour [strftime %H [expr {[unixtime] + ($vNickFrequency * 60)}]]
bind TIME - "$minute $hour * * *" pNickPart
return 0
}
proc pNickPart {minute hour day month year} {
global vNickAbsent vNickChannel
if {[regexp -- {^#} $vNickChannel]} {
if {![channel get $vNickChannel inactive]} {
if {[validchan $vNickChannel]} {
if {[botonchan $vNickChannel]} {
channel set $vNickChannel +inactive
utimer $vNickAbsent pNickJoin
utimer 3 pNickChange
}
}
}
}
pNickSchedule
return 0
}
proc pNickChange {} {
global nick vNickChannel vNickList vNickMode
switch -- [llength $vNickList] {
0 {}
1 {
if {![string equal -nocase $nick [join $vNickList]]} {set nick [join $vNickList]}
}
default {
set oldidx [lsearch -exact $vNickList $nick]
switch -- $oldidx {
-1 {
switch -- $vNickMode {
1 {set newidx 0}
2 {set newidx [rand [llength $vNickList]]}
default {}
}
}
default {
switch -- $vNickMode {
1 {
set newidx [incr oldidx]
if {$newidx == [llength $vNickList]} {set newidx 0}
}
2 {
set newlist [lreplace $vNickList $oldidx $oldidx]
set newnick [lindex $newlist [rand [llength $newlist]]]
set newidx [lsearch -exact $vNickList $newnick]
}
default {}
}
}
}
if {[info exists newidx]} {
set nick [lindex $vNickList $newidx]
}
}
}
return 0
}
proc pNickJoin {} {
global vNickChannel
channel set $vNickChannel -inactive
return 0
}
# eof
Thank you so much i apprecaite this
it really works just a few bugs need to be fixed i hope you can do it here are the logs
Partyline
[00:06] <(ChitChat> [07:07] * IRC NICK CHANGE: ChitChat -> Cam-Girl1
[00:07] <(ChitChat> [07:07] ChitChat joined #chataway.
[00:07] <(ChitChat> [07:07] Regained nickname 'Cam-Girl1'.
[00:07] <(ChitChat> [07:07] -NickServ (service@dal.net)- The nickname Cam-Girl1 is not registered.
Channel
[00:07] * ChitChat (chitchat@204.188.211.21) has left #chataway
[00:07] * ChitChat (chitchat@204.188.211.21) has joined #chataway
[00:07] * ChitChat is now known as Cam-Girl1
[00:13] <stelppA> .
the bot did part but join and changed nick, in the channel and 2nd after the bot joined did not chnage nick again,... it was happen only one time...
@arfer, in my opinion it's better practice to issue the nick-change after the bot parts the channel and then rejoin after the bot changes its nick instead of using timers (bind on bot's part and nick-change instead).
Sir_Fz, I tried to bind on the bot's part but it didn't work. I'm assuming that a PART bind doesn't trigger for the botnick (even though a JOIN bind does trigger for the botnick). I'm interested in a second opinion here. Is this correct?
Thanhas, there would be no reason to get that message from nickserv unless the bot was attempting to identify (or doing a \ns INFO <botnick>) when it changed nick. Check what other scripts you have loaded. I have tested this script quite extensively and found it to work continuously as expected for sequential nick changes and random nick changes with no such nickserv message.
hello Thanks for Replay
yah i am not Pointing something about what nickserv says
its not Working as i said...
It do join part but only one time when i restart and he complete the set time i did in is 3 minute. and yah it dose not do join/part after that.. just one time it happens i checked on simple Eggdrop1.6.19 and there is no more TCL added in...
The bot was trying to change to a nick that was banned on one of its other channels. This would have the same effect as trying to change to a nick that was already in use. ie. not possible.
The -nickserv- message has nothing to do with this script.
I would appreciate some feedback on the PART bind issue. It seems like it does not respond to the botnick parting which is somewhat inconvenient since I think Sir_fz's suggestion otherwise has merit. I'm not a big fan of timers/utimers.
I just tested it on my bot and seems to be working correctly, it does trigger on the bot's part. Recheck your code, maybe you added some flags in the bind or some if-checks in the procedure that caused the odd behavior? I tested it on Eggdrop1.6.19 (in case we're using different versions). Otherwise you'll have to use the RAW bind.
Yes, you are right, when it parts after setting the channel to +inactive the bind is not triggered (weird). But the RAW bind seems to do the job perfectly.
Sydneybabe,
You are posting in a thread that has not had any activity for the last two years, and your posted piece of code is not related to any of the posted solutions to the OP request. There is also little to none information on the actual script you are using. Don't hi-jack random threads.
If you'd like to ask support for a script, use the "Script Support & Release" forum; if there is a specific thread for your script, post there - otherwize start a new thread with a proper topic.