| View previous topic :: View next topic |
| Author |
Message |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Oct 19, 2008 12:51 pm Post subject: |
|
|
I don't see why it shouldn't work. Since you can't provide any information at all, try debugging the script. Use this version for debugging:
| Code: | set nicksNpasses {
nick1 pass1
nick2 pass2
nick3 pass3
}
# Change "10 days" to "1 min" so you won't have to wait that long :P
set tenDays [clock scan "1 min"]
# change {00 00 *} to * so it'll run every minute
bind time - * identify:nicks
proc identify:nicks args {
global nicksNpasses tenDays
if {[unixtime] >= $tenDays} {
identifyNicks $nicksNpasses
set tenDays [clock scan "1 min"]
}
}
proc identifyNicks np {
set items 0
foreach {nick pass} $np {
if {$items < 5} {
# show identification in partyline
putlog "Identifying $nick with password: $pass"
# comment the line below so the script doesn't send real identification
#puthelp "NickServ :identify $nick $pass"
incr items
} {
utimer 15 [list identifyNicks [lrange $nicksNpasses [expr {$items*2}] end]]
break
}
}
} |
Try this code. It's supposed to print "Identifying <nick> with password: <password>" in your bot's partyline for each nickname every minute (with the 15 seconds queue between every 5 nicknames of course). If it works, then there's nothing wrong with the script. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Amr Halfop

Joined: 14 Sep 2007 Posts: 94 Location: Egypt
|
Posted: Wed Oct 22, 2008 9:19 pm Post subject: |
|
|
I got this error in the party line.
| Code: | | Tcl error [identify:nicks]: can't read "nicksNpasses": no such variable |
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Oct 22, 2008 10:02 pm Post subject: |
|
|
| Code: | proc identifyNicks np {
global nicksNpasses
set items 0
foreach {nick pass} $np {
... rest of proc continues ... |
add global nicksNpasses here. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Amr Halfop

Joined: 14 Sep 2007 Posts: 94 Location: Egypt
|
Posted: Thu Oct 23, 2008 9:05 am Post subject: |
|
|
Now it says in the party line that it's identify the nicks , but it doesn't.
Also it says that it's identify the same 5 nicks every 1 sec , and ignores the
rest of the list. |
|
| Back to top |
|
 |
Amr Halfop

Joined: 14 Sep 2007 Posts: 94 Location: Egypt
|
Posted: Sat Oct 25, 2008 9:18 pm Post subject: |
|
|
| so , how to fix it? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Sun Oct 26, 2008 10:52 am Post subject: |
|
|
You didn't report that bug before although it did exist in the previous version. The correct code would be:
| Code: | set nicksNpasses {
nick1 pass1
nick2 pass2
nick3 pass3
}
# Change "10 days" to "1 min" so you won't have to wait that long :P
set tenDays [clock scan "1 min"]
# change {00 00 *} to * so it'll run every minute
bind time - * identify:nicks
proc identify:nicks args {
global nicksNpasses tenDays
if {[unixtime] >= $tenDays} {
identifyNicks $nicksNpasses
set tenDays [clock scan "1 min"]
}
}
proc identifyNicks np {
set items 0
foreach {nick pass} $np {
if {$items < 5} {
# show identification in partyline
putlog "Identifying $nick with password: $pass"
# comment the line below so the script doesn't send real identification
#puthelp "NickServ :identify $nick $pass"
incr items
} {
utimer 15 [list identifyNicks [lrange $np [expr {$items*2}] end]]
break
}
}
} |
Try to test it with a small list since it's just for testing purposes and will *NOT* send actual identification to the services. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|