| View previous topic :: View next topic |
| Author |
Message |
AlexF Voice
Joined: 03 Mar 2014 Posts: 5
|
Posted: Tue Mar 04, 2014 4:45 pm Post subject: Show previous nicknames on connect |
|
|
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:
| Quote: | | <- :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:
| Quote: | | <!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. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Wed Mar 05, 2014 3:00 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|