| View previous topic :: View next topic |
| Author |
Message |
jsilvestre Voice

Joined: 05 Mar 2005 Posts: 20 Location: Lisbon, Portugal
|
Posted: Sat Mar 05, 2005 7:32 am Post subject: Script request! |
|
|
Good morning!
I here to request a simple script.
I have many nicks and i need a script to my eggdrop change is nick every X minutes.  _________________ Best Regards
José Eduardo Silvestre |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Mar 05, 2005 8:57 am Post subject: |
|
|
| Code: | # change nick after how many mins ?
set nchange(mins) "10"
# your nicks:
set nchange(nicks) "nick1 nick2 nick3"
# script goes here:
timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0
proc change:nick {nicks mins} {
global nick nchange
incr nchange(length)
if {"$nchange(length)" > "[llength $nicks]"} { set nchange(length) 1 }
set nick "[lindex $nicks [expr {$nchange(length)-1}]]"
timer $mins [list change:nick $nicks $mins]
} |
This should change the bot's nick every x minutes respectivley from nchange(nicks). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Kurupt Voice

Joined: 22 Aug 2004 Posts: 26 Location: Hermanstat
|
Posted: Sat Mar 05, 2005 5:26 pm Post subject: . |
|
|
| Code: |
bind time - "*5 * * * *" change:it
proc change:it {min hour day month year} {
global nick
set nick [randstring 9]
}
|
|
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Mar 05, 2005 7:12 pm Post subject: Re: . |
|
|
| Kurupt wrote: | | Code: |
bind time - "*5 * * * *" change:it
proc change:it {min hour day month year} {
global nick
set nick [randstring 9]
}
|
|
that'll change the bot's nick to a 9 charactered random nick every 5 minutes, that's not what he wants. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Kurupt Voice

Joined: 22 Aug 2004 Posts: 26 Location: Hermanstat
|
Posted: Sat Mar 05, 2005 7:28 pm Post subject: |
|
|
| oh sorry i whas a lil disturbed |
|
| Back to top |
|
 |
jsilvestre Voice

Joined: 05 Mar 2005 Posts: 20 Location: Lisbon, Portugal
|
Posted: Sun Mar 06, 2005 2:40 pm Post subject: Sir_Fz :) |
|
|
Sir_Fz thanks  _________________ Best Regards
José Eduardo Silvestre |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Mar 06, 2005 7:32 pm Post subject: |
|
|
You're welcome, but you will face problems when you rehash since you will have several timers running. This should fix it:
| Code: | # change nick after how many mins ?
set nchange(mins) "10"
# your nicks:
set nchange(nicks) "nick1 nick2 nick3"
# script goes here:
foreach ntimer [timers] {
if {[string match -nocase "*change:nick*" "[lindex $ntimer 1]"]} {
killtimer [lindex $ntimer 2]
}
}
timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0
proc change:nick {nicks mins} {
global nick nchange
incr nchange(length)
if {"$nchange(length)" > "[llength $nicks]"} { set nchange(length) 1 }
set nick "[lindex $nicks [expr {$nchange(length)-1}]]"
timer $mins [list change:nick $nicks $mins]
} |
Not tested. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
jsilvestre Voice

Joined: 05 Mar 2005 Posts: 20 Location: Lisbon, Portugal
|
Posted: Mon Mar 07, 2005 2:03 pm Post subject: Tks |
|
|
This script work very well...Tks one more time  _________________ Best Regards
José Eduardo Silvestre |
|
| Back to top |
|
 |
Merlin Voice
Joined: 19 Dec 2006 Posts: 2
|
Posted: Tue Dec 19, 2006 9:54 am Post subject: various nicks |
|
|
| it has as to place various nicks and passwords to identify nickserv? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Dec 19, 2006 8:01 pm Post subject: Re: various nicks |
|
|
| Merlin wrote: | | it has as to place various nicks and passwords to identify nickserv? |
No! It simply does as was originally requested; change nicks. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Fri Feb 29, 2008 12:12 pm Post subject: |
|
|
any chance to make the bot to identified each nick with his own pass
# change nick after how many mins ?
set nchange(mins) "10"
# your nicks:
set nchange(nicks) "nick1 nick2 nick3"
set nchange(pass) "pass1" ''pass2' "pass3" |
|
| Back to top |
|
 |
elisca Halfop

Joined: 27 Jan 2007 Posts: 65 Location: in the middle of nowhere
|
Posted: Fri Feb 29, 2008 4:29 pm Post subject: |
|
|
| Code: | set nicksNpasses {
nick1 pass1
nick2 pass2
nick3 pass3
}
set tenDays [clock scan "10 days"]
bind time - {00 00 *} identify:nicks
proc identify:nicks args {
global nicksNpasses tenDays
if {[unixtime] >= $tenDays} {
foreach {nick pass} $nicksNpasses {
puthelp "NickServ :identify $nick $pass"
}
set tenDays [clock scan "10 days"]
}
} |
Note : write by Sir_Fz |
|
| Back to top |
|
 |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Fri Feb 29, 2008 11:08 pm Post subject: |
|
|
| thanks for the reply elesca, i did try out that script ,the problem is it identified all nick and cause nick get akill someime cause its identifiy all the nick.. what i want is the script will chnage bot nick according times and it can be identifed one bye one |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sat Mar 01, 2008 8:17 am Post subject: |
|
|
Try
| Code: | # change nick after how many mins ?
set nchange(mins) 10
# your nicks:
set nchange(nicks) {
nick1 pass1
nick2 pass2
nick3 pass3
}
# script goes here:
foreach ntimer [timers] {
if {[string match -nocase "*change:nick*" [lindex $ntimer 1]]} {
killtimer [lindex $ntimer 2]
}
}
timer $nchange(mins) [list change:nick $nchange(nicks) $nchange(mins)]
set nchange(length) 0
proc change:nick {nicks mins} {
global nick nchange
set nchange(length) [expr {$nchange(length)%[llength $nicks]}]
set nick [lindex $nicks $nchange(length)]
set nchange($nick) [lindex $nicks [incr nchange(length)]]
incr nchange(length)
timer $mins [list change:nick $nicks $mins]
}
bind nick - * identify:nick
proc identify:nick {n uhost hand chan nn} {
global nchange
if {[isbotnick $nn] && [info exists nchange($nn)]} {
putserv "NickServ :identify $nn $nchange($nn)"
unset nchange($nn)
}
} |
This should identify the nickname once the bot changes its nickname (untested). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
minilogo Voice
Joined: 18 May 2008 Posts: 1
|
Posted: Sun May 18, 2008 7:05 am Post subject: |
|
|
how if i want to change the timer from minutes to seconds ?
to let the bots ident nick more faster
Edit: NVM.. found it already replacing timers with utimers and timer with utimer  |
|
| Back to top |
|
 |
|