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.

.-server?

Old posts that have not been replied to for several years.
Locked
A
ALbino

.-server?

Post by ALbino »

This is probably something that you guys get all the time, but since I didn't see it in the FAQ and couldn't find it in search I thought I'd register and ask.

Everytime I .jump a bot it automatically adds the server to the server list. That's great and all, but if I try a new server to see if it works, or I make a mispelling or something then that server is now in it's list to be cycled through over and over. Logging into the shell and modifying the server list is a real hassle, and it seems like there should be some sort of .-server irc.server.com command, but I can't find it. Is there one that I'm just missing? Or is there a real simple tcl script that somebody else has already written that I could just implement? Any information would be appreciated. Thanks for your time,

AL.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

As far asa I know, there is no such command. You can do a tcl script to do the add/remove servers thing directly from the party line (dcc chat) with the eggdrop.
Once the game is over, the king and the pawn go back in the same box.
A
ALbino

Right...

Post by ALbino »

caesar wrote:You can do a tcl script to do the add/remove servers thing directly from the party line (dcc chat) with the eggdrop.
I figured you could, but I have never written any tcl code. Has someone already written something to do this? Failing that, would writing the code to do something that simple be very difficult?

AL.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm afraid that someone didn't already written something like you have asked. To me seems a easy task. When I'll get home, in about 1h, I'll try to do a tcl to do what you have asked. I shall reply again then, if no1 replys before me with an code or something.. :)
Once the game is over, the king and the pawn go back in the same box.
A
ALbino

Sounds great...

Post by ALbino »

caesar wrote:When I'll get home, in about 1h, I'll try to do a tcl to do what you have asked. I shall reply again then, if no1 replys before me with an code or something.. :)
Thanks a lot caesar. I figured it shouldn't be too difficult. Maybe other people will find it useful as well :)

AL.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

set slist {
aaaa
bbbb
cccc
}

bind dcc n rem slist:rem

proc slist:rem { hand idx arg } {
global slist
set rem [string tolower [lindex $arg 0]]
set index [lsearch -exact $slist $rem]
set slist [lreplace $slist $index $index]
putlog "List: $slist"
}

bind dcc n slist slist:list

proc slist:list { hand idx arg } {
global slist
putlog "List: $slist"
}

This is my curently progress in removing it only from the variable and not from the file. I'm curently working on this but I'm kinda newbie with the reading/writing files part. If anyone knows better than me and can give me some tips, sugestions or something to lead me on the right way I'll apreciate it..

As for my curently writing/removing from a file code:

bind dcc n del slist:del

proc slist:del { hand idx arg } {
global slist
set file [open list.txt w]
set line [string tolower [lindex $arg 0]]
lappend content $line
foreach line $content {
set index [lsearch -exact $slist $line]
puts $file [lreplace $slist $index $index]
}
close $file
putlog "Task complete."
}

I'll get back to the squeezing my brain out to find a way to solve this thing.. :)
Once the game is over, the king and the pawn go back in the same box.
A
ALbino

Looks great so far...

Post by ALbino »

Not that I know anything about this though :) A quick thought... if you're going to write it, perhaps you should add a .+server command as well? Just to make it a 'complete' script that can be added to the tcl archives for people to download. If that's difficult, then I'll be plenty happy with .jump to add and .-server to remove :) Thanks,

AL.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

From what I understand, there used to be an issue with operating on the server list i this way. Though I can't confirm that of now.

This resulted in a set of currpt data, if editing by hand or script, though I weem to remember it didn't happen everytime.

Due to the way the code works at this present time, I suspect that there will be no change with regards to this bug (it would have been fixed by now if it could be).

On top, it's doubtful a change to allow such actions as you discribe to take place internaly, will be done in the 1.6 breed of eggdrops.

When 1.7 makes some headway, there is likely to be a large discusion in regards how the server list is handled. Seeing as there will be the possibility to use multiple scripting languages, it's format will have to changed as it is. On top, the config file, will not needly be a scripting language (As it is now, though you may have the choice to switch to one for comform, after some certain settings have been made), as such, the master config file format, will need some method of creating such a list of servers.

These steps are a long way off, and nothing is definate in 1.7 yet.
Locked