Visitor Join/Part/Quit Log

By MaxEvans on Mar 18, 2009

Basically this is a script that creates a log of people who joined and parted your channel, as well as quits and nick changes. Could be useful if you wanna know who visited your chat. This is written for a bot, so it logs visitors but not the bot's nick.

Update: Now writes to a directory called visitorlogs, and each channel has it's own log. Called "Channelname-log.txt".

Writes the log like this:

MaxEvans joined #Max-Chat on 03/18/2009 at 10:21pm.
MaxEvans parted #Max-Chat on 03/18/2009 at 10:21pm.
MaxEvans quit on 03/19/2009 at 09:44am.
MaxEvans[AFK] has changed his/her nick to MaxEvans on 03/21/2009 at 12:42pm.

on *:LOAD: {
  /mkdir visitorlogs
}

on !*:JOIN:#: {
  write visitorlogs/ $+ $chan $+ -log.txt $nick joined $chan on $date(mm/dd/yyyy) at $time(hh:nntt) $+ .
}

on !*:PART:#: {
  write visitorlogs/ $+ $chan $+ -log.txt $nick parted $chan on $date(mm/dd/yyyy) at $time(hh:nntt) $+ .
}

on !*:QUIT: {
  write visitorlogs/ $+ $chan $+ -log.txt $nick quit from $chan on $date(mm/dd/yyyy) at $time(hh:nntt) $+ .
}

on !*:NICK: {
  write visitorlogs/ $+ $chan $+ -log.txt $nick has changed his/her nick to $newnick on $date(mm/dd/yyyy) at $time(hh:nntt) $+ .
}

Comments

Sign in to comment.
Kirby   -  Mar 19, 2009

I think you should choose the one you're more familiar with, although trying new things is fun too.

 Respond  
MaxEvans   -  Mar 19, 2009

So which would be better for this, ini or hash tables? I'm thinking ini would be less complicated, for me at least.

 Respond  
Kirby   -  Mar 19, 2009

I'm not familiar with hash tables yet. I'll look up tutorials and use them though. Everyone says they're better and faster.If you are interested in using them, here is a brief explanation: Hash tables are basically the combined .txt and .ini form of storing information--as Jethro_ said, they're fitting for logging joins/parts/nick changes/quits as hashes can store many bits of information at a time. However, it is only a temporary space of memory and the information disappears when you restart your computer; you would need to save the items put on the table into an alternative file on exit, then reload it again on start.

 Respond  
MaxEvans   -  Mar 19, 2009

I'm not familiar with hash tables yet. I'll look up tutorials and use them though. Everyone says they're better and faster.

 Respond  
Jethro   -  Mar 19, 2009

Hash tables seem fitting in this sort of operation.

 Respond  
Blitzjager   -  Mar 19, 2009

Might be nice to see the address instead of the nick.

 Respond  
MaxEvans   -  Mar 19, 2009

That'll work too. I'll check on that and see what I come up with.

 Respond  
Kirby   -  Mar 19, 2009

the only thing is if you get alot of people joining and parting it will fill up a txt or a ini file fast.
Yeah, I guess so. Even if you have a huge block of text, you can't do much with it.

MaxEvans: Maybe you can make a dialog that shows all the joins, parts, nick changes, quits, etc. Maybe have this script make a separate folder (like 'logz' or something), and have each .ini file save there, and perhaps have the dialog show each join/part/nick/quit message for each channel.

 Respond  
slacker   -  Mar 18, 2009

the only thing is if you get alot of people joining and parting it will fill up a txt or a ini file fast.

 Respond  
MaxEvans   -  Mar 18, 2009

Hmm.. I never thought about that. I'll work on that. Thanks for the idea.

 Respond  
Kirby   -  Mar 18, 2009

If you have joins or parts, why not log quits or nick changes too? Or was your intention solely based on joins and parts?

Because this is a multi-channel script, maybe instead of a .txt file, use an .ini file and make separate sections for each channel?

Overall, this script can be handy.

 Respond  
Aucun50   -  Mar 18, 2009

Simple but handy if you have a small channel and like to log who came in a out

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.