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.

N000000b!! =)

Old posts that have not been replied to for several years.
Locked
b
bigjb

Post by bigjb »

lo,

Im new to tcl and having a bit of trouble, the tcl reference pdf is great except im one of those people who learns better from examples than anything else. Ive had a look around but not been able to find anything helpful though.

Essentially im trying to port a bot from mirc script to eggdrop. I learnt mirc script on the fly as i wrote this bot, and essentially am doing the same now.

I belong to a CS clan that have a free server hosted with a UK2, who are a internet hosting site, they run an irc channel on the quakenet channel where the Server admins for the 80 or so CS servers reside.
The bot basically excepts cheat reports from users when there are admins unavailable.

Im fine with the channel and message binds that facillatate the initiationn of interraction between user and bot and admin and bot, but what im trying to do at the moment is find out how to get it to read individual lines from a file, but from reading the reference im limited to reading in a specific number of bytes, or the whole file.

Is this the case or have i missed something? any help would be appreciated.

also, each report is stored in the format

time nick cheatname wonid server reason

where cheatname is obviously the name of the suspected cheat, wonid is numeric, server is numeric, and the reason will be a multi token variable and is optional.

i plan to use a regex expression that basically comes to

stringnumeric/numeric/numeric/stringnumeric

to seperate the report after parsing the time and nick, since i want to account for the fact that the cheatname can contain spaces, and the reason will be of unknown length.

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

Post by ppslim »

My tip would be to read up ont he gets command, rather than the read command.
b
bigjb

Post by bigjb »

Thanks alot, dont know how i managed to miss that command.
Locked