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 

how to start this..

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Tue Aug 09, 2011 2:34 am    Post subject: how to start this.. Reply with quote

on join whois the user if nick is registered..
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Tue Aug 09, 2011 3:19 am    Post subject: Reply with quote

You'll have to at least mention the network (or the server).
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Tue Aug 09, 2011 11:40 pm    Post subject: Reply with quote

Oops sorry sir the network is Dalnet
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed Aug 10, 2011 4:22 am    Post subject: Reply with quote

Code:

bind join * * registered:join
bind raw - 307 registered:match
bind raw - 311 registered:first
bind raw - 318 registered:last

proc registered:join {nick uhost hand chan} {
   if {[isbotnick $nick]} return
   puthelp "WHOIS $nick"
}

proc registered:first {from key text} {
   global registered
   set user [lindex [split $text] 1]
   set registered($user) 0
}

proc registered:match {from key text} {
   global registered
   set user [lindex [split $text] 1]
   set registered($user) 1

   # user has identified for this nick
   # use $user to do whatever you need with it
}

proc registered:last {from key text} {
   global registered
   set user [lindex [split $text] 1]
   if {!$registered($user)} {

   # user didn't identified for this nick
   # use $user to do whatever you need with it
   
   }
   
   # don't remove the following line
   array unset registered $user
}

As always, I haven't tested this, but should work. If it doesn't then let me know.

Edit: fixed.
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Thu Oct 20, 2011 6:27 am; edited 1 time in total
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Thu Sep 22, 2011 7:06 am    Post subject: Reply with quote

Hi sir caesar, how can i halt the script on netsplit since it will autovoice all registered nick that came from netsplit? Thanks in advance. Very Happy
Back to top
View user's profile Send private message
Sydneybabe
Op


Joined: 27 Apr 2007
Posts: 106
Location: Philippines

PostPosted: Thu Oct 20, 2011 3:08 am    Post subject: Reply with quote

Hello sir caesar, i am encountering an error on the script this is what appear on the partyline:
Code:
<eggdrop> [14:56:21] Tcl error [registered:first]: can't read "user": no such variable
<eggdrop> [14:56:21] Tcl error [registered:match]: can't read "user": no such variable
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Oct 20, 2011 6:27 am    Post subject: Reply with quote

Ah, sorry, mixed two lines and forgot to add one. Fixed the code in my previous post.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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