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.

Search found 16 matches

by Anansi
Wed Jul 18, 2007 8:20 am
Forum: Scripting Help
Topic: Is set?
Replies: 9
Views: 5289

Right, but it was bitching about the previously untouched variable "not being an array" when I tried to set one of its members. unsetting the variable just prior to setting it was not an option because the procedure that set the variable was called several times to set different members - ...
by Anansi
Tue Jul 17, 2007 4:54 pm
Forum: Scripting Help
Topic: Is set?
Replies: 9
Views: 5289

Can I declare a variable as an array without actually writing anything on it? I want a global array to be initialized within a procedure, but if I don't initialize it outside the procedure when I try to initialize it inside it returns the "not an array" error. I'm using "global arrayn...
by Anansi
Tue Jul 17, 2007 4:24 pm
Forum: Scripting Help
Topic: Is set?
Replies: 9
Views: 5289

array exists was easy to find, but not info exists :P Thanks.
by Anansi
Tue Jul 17, 2007 2:02 pm
Forum: Scripting Help
Topic: Is set?
Replies: 9
Views: 5289

Is set?

Is there a way to return (without crashing the procedure) whether a variable is set or not set? I need this specifically for array elements, but it would also be useful (and work in a similar manner) for normal variables.

I looked in the Tcl manual and could find nothing.
by Anansi
Tue Jul 17, 2007 2:00 pm
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

Thanks :) Sorry it took so long to reply, but I had to study for an exam these past few days, so I had no time for Tcl.
by Anansi
Sun Jul 08, 2007 4:32 pm
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

But it's still only a workaround for the bug. mafia_killplayer also uses mafia_echo and calls other procedures that also use mafia_echo, so such a workaround will be pretty hard to implement - I'll have to mess up my otherwise clean code by adding tests and globals all over the place. Still, thanks ...
by Anansi
Sun Jul 08, 2007 11:17 am
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

I tried going around the valididx check in case of a disconnection but it doesn't work either - putidx returns invalid idx for all IDXs I think I understand what you mean. So should I make a queue, add messages to that queue in case of a disconnection and have a timer calling a procedure to output m...
by Anansi
Sun Jul 08, 2007 7:39 am
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

As you have suggested, I added some putlogs here and there to try and narrow down the problematic code. mafia_echo has a check that uses the valididx function to confirm that an IDX currently exists before using putdcc on it. I added a putlog there, and as soon as someone disconnected, the partyline...
by Anansi
Sat Jul 07, 2007 8:56 pm
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

I know that they are being executed because mafia_killplayer and mafia_killcon both perform vital changes to variables and those changes are being performed. I repeat, ONLY the putidx commands in mafia_echo are ignored. I tested this exhaustively.
by Anansi
Sat Jul 07, 2007 7:09 pm
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

Either you don't understand or you aren't explaining yourself clearly. Just in case it's the former, here it goes: In bold are the statements the bot evaluates and executes. Imagine the player had the IDX 25 . SITUATION 1) .tcl mafia_line 25 "" if {$text == ""} { mafia_killplayer...
by Anansi
Sat Jul 07, 2007 9:10 am
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

Like I wrote, all the other commands in the IF are executed properly when a user is disconnected - both before and after the mafia_echo . The ONLY thing that doesn't work as expected is the putidx having no effect. It doesn't even halt the script execution, it's just ignored as if the statement wasn...
by Anansi
Sat Jul 07, 2007 9:06 am
Forum: Script Requests
Topic: Tcl to make the bot DCC me
Replies: 3
Views: 3248

Didn't know TCL supported escape ^^ Usually I include the actual characters in the script.

Aditionally, it may make more sense to replace that "o" with a "p" in the bind command.
by Anansi
Fri Jul 06, 2007 2:24 pm
Forum: Scripting Help
Topic: Possible eggdrop bug when user disconnects from dcc chat?
Replies: 13
Views: 8577

Possible eggdrop bug when user disconnects from dcc chat?

I wrote and maintain a TCL with roughly 2000 lines that implements a game of Mafia to be played on IRC with multiple players (it runs on irchighway). The game is played in a telnet session hosted by the bot. Note that I will only paste here code snippets, often taken from different locations in the ...
by Anansi
Fri Jul 06, 2007 2:05 pm
Forum: Script Requests
Topic: Tcl to make the bot DCC me
Replies: 3
Views: 3248

In your eggdrop.conf, replace listen 55555 users by set myport 55555 listen $myport users Where 55555 is the port you want to use. Then add the following tcl: bind msg p !chatme sendinvite proc sendinvite {nick usermask handle chan text} { global myport putserv "PRIVMSG $nick :\001DCC CHAT chat...
by Anansi
Mon Jul 02, 2007 10:48 pm
Forum: Eggdrop Help
Topic: Eggdrop keeps interfering with channel modes
Replies: 2
Views: 2245

They haven't, I restart and rehash the bot frequently.

Adding some characters to opchars seems to have fixed this issue for now. Any ideas on the DCC disconnection?