[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  IRC support (a theory)...
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

IRC support (a theory)...

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Thu 06 Jan 2005 05:48 AM (UTC)
Message
I don't have time to fiddle with the idea, but thought I would post about it here anyway. So, here is the concept:

In the OnPluginInstall...
1. Use a coprocedure to 'listen' at 127.0.0.1, say port 6880.
2. Use the new features for resizing windows to shrink the world window and fit a notepad window into the space now available to the right side of it.

In OnPluginConnect...
1. Connect to IRC at <server>:<port>.
2. Have a coprocedure listen to <port> for the server traffic to follow.
3. When /join #name is used, spawn a duplicate world window. One question... Is there some way to determine 'which' of such windows a command is typed in? If not, then server messages may need to be dumped to another notpad and channels limited to only one.
4. Send all typed commands, other than aliases called with '/', direct to the IRC server.
5. Any 'inbound' text from the IRC server is dealt with, adding time stamps, updating Nick lists, etc. And any traffic dirrected to an active channel gets feed to 127.0.0.1:6880, where Mushclient 'thinks' it is listening to a mud.

Presto... Instant plugin for turning Mushclient into an IRC chat client (and one a lot more user configurable and understandable than the mess mIRC calls triggers and scripting.

I may fiddle with making it work myself, or I might not. I am in the middle of trying to download some stuff that is likely to take a lot of time (like weeks over dial-up), so I don't exactly have the time to try it. Maybe someone else has the time and info to try this.. Besides, while the idea is sound, I have no clue how the IRC protocols actually work at the moment.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Thu 06 Jan 2005 06:07 AM (UTC)
Message
Quote:
(and one a lot more user configurable and understandable than the mess mIRC calls triggers and scripting.
Out of curiosity what do you think is wrong with the mIRC system? I wrote rather extensive scripts in it - in fact a whole package or whatever they were called - but that was some time ago and perhaps things have since changed. It seemed like a very powerful system to me, and not terribly complex at all.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #2 on Thu 06 Jan 2005 06:19 AM (UTC)

Amended on Thu 06 Jan 2005 06:23 AM (UTC) by Flannel

Message
I've never quite figured out mIRC. I tried, well a while ago, and could never get much of anything to work. I haven't looked into it recently, but I do remember it being circular and daunting at the very least. Something that required jumping into, and not simply meddling in.

As for the seperate worlds. You could make a 'template' world, which you could then open for a new world with for each channel.

Why is this in Lua? What would be Lua dependant?

On a similar note:
I've tried to find a program for AIM/ICQ/et. al. that works like MC, since I'd love to automate/script my away messages and such. Miranda seems to look favorable, although I did contemplate making a relay daemon for the chat clients so I could connect via MC (much like Shadowfyr is suggesting).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #3 on Thu 06 Jan 2005 11:34 AM (UTC)
Message
I used to script in mIRC a lot, it's very easy and powerful. I don't know about using MC for IRC, it just isn't meant for IRC, but that's just me...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #4 on Thu 06 Jan 2005 11:40 AM (UTC)
Message
By the way, you don't need to create new world windows, just prefix the line with the room name, BitchX style. It'll take some getting used to, but it won't be much different than MUD channels...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #5 on Thu 06 Jan 2005 05:09 PM (UTC)
Message
Well.. First, what is wrong with mIRC? While I supposed new version do have some added things, like regular expressions, I have found it filled with odd things. As an example, there is a thing called #idlerpg on one server. The concept (as insane as it sounds) is to idle your way to character improvement. A line with someone logging in is like:

Fred, a level 53 Big white rabbit, has logged in. He will level in 1 day, 21:10:01.

The problem being that neither 'Fred', nor 'Big white rabbit' are going to appear that way all the time. Both could consist or only one word, multiple words, etc. While the wildcard system can deal with this, the way mIRC handles returning items from a line, literally $1 = first word, $2 = second word, etc., it is a lot more complicated than Mushclient's system.

There are other things I have found to be similarly frustrating about it, not the least being, at least in the version I have been using, the help file for all its features itself. Like I told someone on a forum I was getting help with something for it with, I have gotten used to Mushclient, where the limitations are more about what I am willing to try, not what or how it is designed to work.

Second.. Why is it Lua dependant? Well, that should be obvious. I suppose you could do it in Python as well, since it also supplies threads, I think. But the key issue here is that you need something for the world to connect to and something to connect to the IRC server. This could be a special designed Proxy, sort of like what I made previously to test scripts and things with Mushclient, but if you where to do it without any external applications, then you have to have code running parallel to the client. The IRC part must be able to capture stuff as it arrives from the server continuously. this means you can't just suspend that part when doing something else, then start it again when you need it. Lua is one of, if not the only, script system that lets you run such processes parallel to Mushclient, without completely locking up the client and making it impossible to use anyway.

As for the arguement about it not being for IRC... I got a similar arguement when I compared how triggers worked in MC with mIRC. My only response to the arguement was "Huh?". Yeah, it isn't designed to handle the nicks and other server specific parts of the IRC protocol, however, what is really the difference between mud text and IRC text? Both use ansi and both are well... text. If you dump the text from the server to a telnet port and MC recieves it there, then there is no effective difference. The differences are all in the underpinnings, the core operation and that can be done through the scripting. Well, and minor differences in the way the windows operate... But the mere fact that it should be possible at all, make the arguement that it isn't designed for it a matter of programming support for it, not a limitation of overall function.

As for the final issue.. Having to append the name of the channel, so that the channel is recognized is not imho practical. However... There is nothing to prevent using a template window that 'passes' the stuff you type back to the main world. The template would have an alias you could call when created, which set a variable for that world specific to that 'channel'. The template world could then automatically append the channel it belonged to.

Anyway. mIRC isn't looking 'quite' as bad as it was. I am just so used to the way Mushclient did things that it was like being handed a 'programmable' calculator and initially discovering that all it seemed to do is the basic four functions. lol I still find it more convoluted and frustrating, but it isn't quite as bad as I thought. Frankly though, I would still prefer an adaptation closer to MC, especially since it appears 5.91, which I am using, may have a "in 30-days I die" feature I didn't know about and I may lose the only client I do have at the moment. mIRC just feels sort of clastraphobic after using MC.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #6 on Thu 06 Jan 2005 05:17 PM (UTC)
Message
Quote:
the way mIRC handles returning items from a line, literally $1 = first word, $2 = second word, etc., it is a lot more complicated than Mushclient's system.
That's just the default behavior, there are tons of other ways of tokenizing the line or even getting the whole line at a time.

I think the real problem we're running into is not a limitation of mIRC but the fact that it's quite different from MC and as you admitted you're just not used to it yet. :P

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #7 on Thu 06 Jan 2005 06:57 PM (UTC)
Message
I didn't mean that it won't work, just that it'll be like using excel to write a database, it just isn't made for that... Also, you can do the multiple window thing, but channels in the name would be simpler.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #8 on Thu 06 Jan 2005 08:43 PM (UTC)
Message
True Ksilyan. Though I use it so rarely (and until recently not at all), that I don't see the point of 'getting used to it'. One factor I considered was also that I actually have MC registered, which I don't see the point of doing so with mIRC, if any other alternative exists.

In any case, as I said, this was just an idea I had of how to adapt Mushclient to do IRC as well, if anyone wanted to fiddle with the idea.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #9 on Thu 06 Jan 2005 09:14 PM (UTC)
Message
To be frank, I think that getting IRC to work in MC would be cute, but I'm really not sure it's worth the effort to get it working in MC just to use MC's scripting language, when mIRC already has a completely functional (and specialized) scripting language of its own.

Granted though, the problem of having registered MC but not mIRC is worth considering. Still, it seems a little hacking to force MC to think an IRC server is in fact a MUD server. :-)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Reply #10 on Thu 06 Jan 2005 11:42 PM (UTC)
Message
Well, an IRC server IS a MUD server... Telnet is a superset of IRC, so you should be able to connect to IRC right away (if you know the protocol, anyway). I get my emails from my POP server using MC all the time.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #11 on Fri 07 Jan 2005 01:27 AM (UTC)
Message
I wasn't talking about a difference of protocol. I was talking about a difference of paradigm; e.g. one connection to IRC server can be multiple windows, whereas MC's idea is that one connection is typically tied to just one main output window.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] bio
Date Reply #12 on Fri 07 Jan 2005 03:54 AM (UTC)
Message
Yes.. I admit there are some current limitations that make it impractical. It might be different once we have custom windows, since concievably, those that have 'imput' areas may also allow for a special plugin function, something like:

OnPluginWindowCommand (BSTR WindowName, BSTR Text)

I would expect that anyway, since it would allow a script to append things like 'say' or the like to the text, before sent. There is the possibility of making so an alias option exists too, so that the alias only works if the command is typed in a specific window. Once either or both exist, there is no real reason it can't work. Nicks are a bit more complicated, but technically you could get by with just using one window and adjusting the contents depending on the active window. With custom windows, appearing in the tab list, each one could even use the channel name as the window title. We have 99.9% of the function already, the only 'big' factor is things like custom windows, which we are currently missing anyway, but will at some point be added.

If, as Poromenos says, it uses something close enough to telnet that you can intercept the data and process it in a plugin, then the final reason for it to not work as one vanishes. Granted, the script needs to handle taking the captured information and deciding what to do with it, but that is the only part that Mushclient can't, or won't at some point in the future, support directly. But that is the point of a plugin.

Keep talking Ksilyan, you are only making it more likely that it would be possible, not less. ;) lol
[Go to top] top

Posted by Beale   (35 posts)  [Biography] bio
Date Reply #13 on Sat 08 Jan 2005 01:50 AM (UTC)
Message
Um. I actually did make an at least half functional trigger and alias set for using MUSHClient as an IRC client. It prefixed any chats with the name of the channel, (eg: "(Chat) Beale: I am the monkey!" This is the format used on the MUD I play, so I was trying to replicate that.) and showed up opping and such formatted nicely. Then, I tried to reload the world file and got a whole bunch of invalid character errors, since I'd copy/pasted the non-standard characters in the triggers instead of using codes for them. Then I went and found a nicer IRC client than mIRC. :)

The interpretation just requires a bit of looking at the IRC standard, copying the basic text travelling, and a fair bit of testing and fiddling.
[Go to top] top

Posted by Relient F   (2 posts)  [Biography] bio
Date Reply #14 on Thu 04 Jun 2009 01:54 PM (UTC)

Amended on Thu 04 Jun 2009 01:59 PM (UTC) by Relient F

Message
I agree with the last poster here. IRC isn't really that bad. I don't see why you would make an external app for it though? All you really would need to do is make some triggers, aliases and other things. Some basic irc things:
When you connect, you need to "register" to the server. You can do this with
nick YourName
user Username localhost server :Your real name
Then you should get "welcome to the whatever, "+YourName+"!" Ur sorry, some moo concatination for ya...
Anyway after you have registered, you can join #channels, privmsg PersonOrChannel :with your message, whois APerson, quit :because you feel like it, and do lots of other things. :)
Also, some of the /commands you enter in your irc client aren't really client commands, but are server commands put through a filter to make them go through. /nickserv and /helpop are a couple examples. In fact, if your client doesn't recognize a /command you give it, it passes your command to the server putting :before parts of it.
HTH!
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


21,261 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]