egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AutoIdentify script for other nicks (DALnet)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Oct 19, 2008 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Amr
Halfop


Joined: 14 Sep 2007
Posts: 94
Location: Egypt

PostPosted: Wed Oct 22, 2008 9:19 pm    Post subject: Reply with quote

I got this error in the party line.

Code:
Tcl error [identify:nicks]: can't read "nicksNpasses": no such variable
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Oct 22, 2008 10:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
Amr
Halfop


Joined: 14 Sep 2007
Posts: 94
Location: Egypt

PostPosted: Thu Oct 23, 2008 9:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Amr
Halfop


Joined: 14 Sep 2007
Posts: 94
Location: Egypt

PostPosted: Sat Oct 25, 2008 9:18 pm    Post subject: Reply with quote

so , how to fix it?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Oct 26, 2008 10:52 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber