This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Sugestion..

Old posts that have not been replied to for several years.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I was thinking to use "foreach" on the nick/part/kick/quit event to check if that nick who do that is on that variable ($users), and if is in there to remove it from the list, to split that $users again and remove it. On each event (nick/part/kick/quit) to run a proces to see who is not on channel. I'll add a if with is a user or is him. :smile:
Notice that my .next is a pub command not a party line command. For this command I was thinking to use: if he has @ in there and if that nick in on the channel to give him voice, else do that check until a nick is on channel. :smile: Any other sugestion?

PS: Do you know a link where I can read about splits and lrange and the rest of this? This will be nice and very helpful for me. :smile: Thx!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I looked at that tcl and is not what I needed. That is no voice for some nicks or something like this, as I understand.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

the tcl manual maybe?
http://www.scriptics.com/man/tcl8.3/TclCmd/contents.htm

has all you need to know about splits, list functions, etc
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

I was thinking to use "foreach" on the nick/part/kick/quit event to check
If you keep a list of $users, check out the [lsearch] command at the scriptics site, instead of the foreach.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, Petersen I was talking about the tcl made by egghead. Thx for the link. Thx again egghead for the tip. :smile:
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

... and Petersen gave you a link for your own question:
PS: Do you know a link where I can read about splits and lrange and the rest of this? This will be nice and very helpful for me.
As a last message on this topic, the angelina.tcl is now updated to include also PUB commands. If you have some 5 spare minutes while scripting your heavy bookkeeping caesar.tcl, load the angelina.tcl and test it :smile:

<font size=-1>[ This Message was edited by: egghead on 2002-02-10 16:10 ]</font>
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I sow that link, but was to late.. I just pushed the Submit button.. :smile:

Hahahaha.. I'll see that upgrade. Thx! :smile:
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Well, I looked at that angelina.tc file and.. is stil not the thing I'm looking for to make. Well, Wen a nick joins a channel adds to that users variable and when I say .next (pub or dcc) to give voice to the first, then erase that nick from the users variable. When I say .next to repeat the proces like the previous. On a nick/kick/part/quit to do that check if the nick is in users variable to remove it, and if is a nick change to add the new nick at the end or replace in the users variable the old nick with the new one. :smile: I don't have anought time to make my tcl right now cos I got some exams and.. not so much time to think at that tcl. :smile: After I finish my sesions (faculty one) I'll make this like I want. :smile: I'll wayt for any other sugestions related about this. :smile: Thx again!
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

For my first sugestion here is the solution..
- solution -
set chan [lindex [split $text "#"]1]
set chan [lindex [split $text]0]
- solution -

:smile:
Locked