You are not logged in.

#1 2010-01-11 18:50:08

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Script Idea - Input from experienced devs welcome!

This is an idea for a script I've had for Irssi, but I'm not sure if it's even possible, and if so, how I would go about doing it best.  What I'm looking for in this thread are any suggestions people may have, or examples of similar features in other programs.

The idea: Create a script for irssi (or a stand-alone script) to check IRC for people you've added as "friends" and see if they're online.  However, the script would need to take into account nickname changes and whatnot, so /whois <nick> wouldn't work, since the user would be marked as offline once they change the nick.

The problems: I'm not sure how to go about maintaining information about the users, without requiring them to login to some sort of service, and without requiring them to run the same script as well.  I'm not sure it's even possible, or how best to go about it, or even what language would be best for this kind of project.

I'd be happy for any suggestions from coders who might have a better idea on this than I do.  Also, if I figure out how to do it, I'll be posting the script in here as I work on it, and will (if it works well) release it in AUR for people who find it useful.

Background info as to why I want to do this: A few friends of mine use IRC as their only regular chat program, and don't have a channel where they hang out in all the time, nor does their nickname stay the same, so I'd like some way to know if they're online so I can query them.

I realize that IRC wasn't really intended for this kind of networking, but I figured I'd ask here for any suggestions as to how to go about it, before I write it off as impossible.

Thanks in advance for any ideas,
Lswest

*edit* Ghost1227 suggested I use hostmasks to add the user to my friends list, so I'll be exploring how to do that in Python as a stand-alone script.  Any suggestions on how to best accomplish that would be great.  I'll update the post here if I run into any issues, or if I start making progress.

Last edited by lswest (2010-01-11 19:06:24)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#2 2010-01-11 19:33:27

XFire
Member
From: UK
Registered: 2008-05-11
Posts: 192

Re: Script Idea - Input from experienced devs welcome!

Would you not need to use a central server which holds the buddy list for distribution? I believe this is how IM works, the central server holds buddy information and relays the info to the client when one signs on or off and so on.


There is a difference between bleeding [edge] and haemorrhaging. - Allan

Offline

#3 2010-01-11 19:39:09

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Script Idea - Input from experienced devs welcome!

Generally, yes.  However, I'm not interested in creating an actual IM extension to IRC, but merely an extension that allows you to see if people are online or not.  You can do the same with a script that checks the hostmask (which I'd store locally in a database) to see if it's connected or not regularly (check every 5 minutes or something).  I'm not yet sure of the logistics, as I haven't started writing the script yet (it's 8:30 pm in germany, and I'm not awake enough to start the project right now).  However, I don't think a central server will be required for my project, unless I decide to create a two-way buddy list.

Last edited by lswest (2010-01-11 19:40:41)


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#4 2010-01-11 23:40:26

Grazz256
Member
Registered: 2009-06-28
Posts: 69

Re: Script Idea - Input from experienced devs welcome!

Don't quote me on this but I believe what you want to do is impossible with IRC. The problem is that you need something static to check, with most IM systems there is some sort of universal id number (or name or email) that is always associated with the person. If I remember correctly (admittedly its been a number of years since I used IRC and a few more since I dabbled in the protocol) IRC has no unique identifier, so unless all of your contacts have static IP addresses its going to be difficult/impossible to find them with a script.

If everyone is using the script you could have a chat room setup where people can broadcast there status after a certain trigger string is sent like so...

You want to check you contacts status, script transmits CHECK STATUS <UUID> to #status_checker
contacts reply ONLINE <UUID> to that channel. uuid is a unique number to that person.

Cheers

Offline

#5 2010-01-12 09:19:34

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Script Idea - Input from experienced devs welcome!

That's definitely an idea to look into, but as far as I know, hostmasks are usually used for bans and whatnot since it doesn't change/doesn't change very often.  It may not be ideal, but it's definitely more manageable for me than setting up a channel for the script's use.  If I end up deciding that hostmasks aren't the way to go, I'll definitely look into your idea more thoroughly.


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

#6 2010-01-12 22:24:42

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 158

Re: Script Idea - Input from experienced devs welcome!

/help notify

Offline

#7 2010-01-12 22:27:08

lswest
Member
From: Munich, Germany
Registered: 2008-06-14
Posts: 456
Website

Re: Script Idea - Input from experienced devs welcome!

Ah...that definitely calls for looking into.  Seems to do exactly what I wanted, just need to check to see how the notify lists work and if they use hostmasks instead of nicknames.  Thanks! (Saves me a lot of work if it does what I think it does tongue).


Lswest <- the first letter of my username is a lowercase "L".
"...the Linux philosophy is "laugh in the face of danger". Oops. Wrong one. "Do it yourself". That's it." - Linus Torvalds

Offline

Board footer

Powered by FluxBB