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.

Show previous nicknames on connect

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
A
AlexF
Voice
Posts: 5
Joined: Mon Mar 03, 2014 7:29 pm

Show previous nicknames on connect

Post by AlexF »

Hi

I am owner of quite a large network (0000's) and I'm in the middle of converting some of our utility bots that are currently mIRC based in to TCL to run on eggdrop.

I've picked up the basics but there are some more complicated scripts that I've written in mSC that I can't figure in TCL.

One I'm stuck on is we have a bot that has OPER on the server and monitors connects in server notices. An example of a server notice:
<- :CHAT04. NOTICE Port_4 :*** CONNECT: Client connecting on port 6667 (class users): SomeUser!Female@1.2.3.4 (1.2.3.4) [18 Female Canada]
It then logs the nickname against the IP address and shows previously nicknames for that IP address in a specified channel, example:
<!Port_4> Client SomeUser connecting from 1.2.3.4. Previous nicknames this user has connected with: AnotherUser1, AnotherUser2, AnotherUser3
Can someone provide an example of such thing in TCL please?

Thanks

AlexF

Moderator edit: don't post real IPs.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hi,

you have 4 options to get this done: store in memory (via dict or array for instance, but I wouldn't recommended), in a flat text file (you need to make your own seeking of the IP or whatever info you want to read), a MySQL database (via mysqltcl library) or a sqlite local database (via sqlite library) that doesn't need a MySQL server cos it writes it's stuff in a file.

I would honestly pick one of the last two, preferably the MySQL version.
Once the game is over, the king and the pawn go back in the same box.
Post Reply