ID:151549
 
So, right now I'm attempting to find a way to link BYOND and IRC.

What I'm trying to do, is have control over the world, as well as connect it to irc, so the irc:// link doesn't really do what I want, entirely.
I've tried using shell() to send out telnet commands, to connect to irc that way, but..
"shell proc
..
The calling proc will sleep until the command is finished executing. "
Because of this, I can't do something like:
    shell("telnet linux.gdiracing.com 6667")
shell("user ident host linux.gdiracing.com :[ckey]")
shell("nick [ckey]")


(And I was hoping that'd do it, so I could figure out how to intercept stuff like PING, but it doesn't work, so..)

I've also looked around in irc.dms, but it doesn't seem like I can do too much to it.
Has anyone tried to do this with success? Am I thinking outside the scope of possiblities? Does BYOND even care about IRC anymore? :o
DivineTraveller wrote:
Am I thinking outside the scope of possiblities?

I imagine with a DLL file running some code on a different thread (if it isn't on a different thread, call() will lockup until the DLL has completed it's process, IIRC) you could probably manage to pull it off using something like world/Topic().

Does BYOND even care about IRC anymore? :o

IIRC, Lummox isn't too fond of IRC. And I personally couldn't care less about it. =D
Totally bumping this because I'm curious again. I've been told also it could be done with a DLL, and now maybe world/Topic() (I wouldn't have the foggiest clue where to start with this one) -- does anyone else have any ideas how this could be done? Aside telnet of course - that'd be a pain to work with =/

[edit] I've also heard JavaScript can do it, and that's what I'm looking into right now, if nothing else, as a learning experience.
In response to DivineTraveller
DivineTraveller wrote:
I've also heard JavaScript can do it

Indeed. I usually handle such things through mibbit in a nice little browser pane embedded in a tab. This way I save on a lot of traffic and can easily embed the same application on the game's web appearance.
In response to Schnitzelnagler
In that same sense, would it be possible to instead use something in the browser to act as a go-between, and something like Forum_account's interface library (to handle the javascript<->dm interface), thus allowing me to funnel messages where or how I wanted to? I ask because this could potentially make a nice demo.

I'm not really sure about using something like mibbit, because I think it looks pretty bad. That's just me being picky, though. I do agree that it'd be nice in the case where you want to quickly embed it in a website, game, and maybe forums or some-such, though.
In response to DivineTraveller
DivineTraveller wrote:
(...) something in the browser to act as a go-between

Given that mibbit is supposedly replies on JavaScript, yes, that should be completely possible.


DivineTraveller wrote:
(...)it looks pretty bad(...)

The client is rather customisable, but I can see and understand your point ;)


DivineTraveller wrote:
I do agree that it'd be nice in the case where you want to quickly embed it in a website, game, and maybe forums or some-such, though.

Indeed. I enjoy the thought of being able to chat with people in your BYOND game from your forum or even BYOND hub page, if the BYOND administration ever allows to embed some special widgets.
DivineTraveller wrote:
Does BYOND even care about IRC anymore? :o

Not particularly, unless there is a compelling reason to support it. The telnet.dms and irc.dms stuff is for using DS as a telnet/irc client, which doesn't seem too important these days (and I'd be surprised if it still worked fully). I think the other direction-- allowing telnet/irc to connect to a DD server-- is more compelling, and that works for telnet at least, assuming you follow a certain setup for your world. Is that what you're trying to do for irc? I guess I'd need a better description of what you're trying to accomplish to give you an answer.
In response to Tom
I don't mean using DS as a client, no - I mean being able to link a world with an IRC server, so you can chat across them (like, my output control to your #channel). It wouldn't really need to support all of the IRC commands, it would just need to send all of the IRC data along, and parse out PRIVMSG commands - someone else would certainly write the rest of the implementation (for ops, voice, boot/ban/kick) if they needed it, I'm sure.

My only real goal here is uniting two different setups. For two reasons:
  • I write IRC bots in Java, and I think they're incredibly useful to have around, and I don't think I'd be able to write similar ones in DM. Bots I've written right now include an idling game (which can be done), an RSS aggregator (not sure, maybe fiddling with world.export()?), and a bot that does a lot of random things (makes comics based on text, observes chat/learns how to form sentences, does some text parsing/calculating). I also plan on writing more in the future, just because of how easy the are to manage, and how useful they can be. On top of that, there's a neat bot written in python called gozerbot (which could be worked with via telnet), which I played with for a while too. I've just found that writing external applications to communicate things like this is really easy with IRC mixed with Java, because of Java's wide array of functions, and IRC's relaying abilities.
  • I think it'd be really cool to be able to link up to an IRC server, and have dozens of people chatting just from an IRC channel with a game. There's one small community I'm involved with, where we have an IRC channel and a game that's regularly played, and they're almost always on both simeultaneously (sp), so communication like that would be probably simple, but it's a really specialized case, and I understand that.


I realize what I'm asking is a significant paradigm shift from the norm here, but it's something I've been adamant about (and now have a few solutions to try to accomplish if there is no current way).
In response to DivineTraveller
Interesting idea. Have you played with world.Export() at all? I think you could use that to setup a persistent connection to IRC through which you could pass commands back and forth. I'm not sure the commands from irc would be relayed back properly in world.Topic(), but you could test that. This would likely need some extra support on our end; I'd have to know what currently works/doesn't work.

Certainly a dll could be used to link up with irc. You'd basically want a function that you could call() that would initialize the link and then subsequent functions to pass information around. Again, this would take some experimentation to make sure you have got things communicating.
In response to Tom
I have played with world.Export(), but it was only for BYOND2BYOND, so I never really have done anything like what I'm imagining. Maybe I'm wrong with this, but for IRC, all it sends is a really large text string to everyone who's supposed to see it, and the client interprets it (funnels it to a separate window, or displays it onscreen, or whatever it does). I have to finish up a few small things with my current project, and then this is my highest priority, so I'll make sure to give it a shot!

I was told quite a bit, a DLL would be the easiest route, but unfortunately I have little to no C/C++ experience, so this is out of reach for me. I've been trying to raise a bit of interest, but no one seems to want to do it (I can't blame them, really).
In response to Tom
Tom wrote:
I think you could use that to setup a persistent connection to IRC

Actually, come to think of it, I'm pretty sure world.Export() will just ignore non-BYOND / http connections. (test it just to see what happens). We'd have to support irc:// within the protocol to get this part to work, but that might be do-able since we presumably have code to understand irc for the much-less-useful client support.

Another possibility is to use the http:// support for world.Export() to send your messages to a webserver and have those relay to the irc server. The other direction (communicating via irc to byond) is trickier...

I'm mostly trying to figure out what works now and get a sense of what we'd have to do to get it working better.
In response to Tom
Tom wrote:
"The telnet.dms and irc.dms stuff is for using DS as a telnet/irc client, which doesn't seem too important these days ... "

I think the only BYOND project that even uses telnet is Xooxer's Chatters.
I have yet to see any other project use irc or telnet.
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
Tom wrote:
"The telnet.dms and irc.dms stuff is for using DS as a telnet/irc client, which doesn't seem too important these days ... "

I think the only BYOND project that even uses telnet is Xooxer's Chatters.
I have yet to see any other project use irc or telnet.

That's actually different. Chatters lets you connect via telnet. Telnet.dms lets you connect to telnet addresses (use DS as a telnet client).
In response to Tom
Tom wrote:
That's actually different. Chatters lets you connect via telnet. Telnet.dms lets you connect to telnet addresses (use DS as a telnet client).

Ah, okay. Sorry to have mixed that up.
In response to Maximus_Alex2003
For the record, artemis allows you to connect via telnet too. Not that we use it anymore, but it does.
In response to Tom
Tom wrote:
Another possibility is to use the http:// support for world.Export() to send your messages to a webserver and have those relay to the irc server. The other direction (communicating via irc to byond) is trickier...

If you're going with PHP, most of the work is already done, as it seems.id:394116

Might actually make for an interesting service, now that I think about it and not only for IRC but for a more modular, text relay to any service. I wonder if one could convince ATPHost/Airjoe to provide a solution like that.
In response to Tom
Tom wrote:
Tom wrote:
I think you could use that to setup a persistent connection to IRC

Actually, come to think of it, I'm pretty sure world.Export() will just ignore non-BYOND / http connections. (test it just to see what happens). We'd have to support irc:// within the protocol to get this part to work, but that might be do-able since we presumably have code to understand irc for the much-less-useful client support.

Testing with this:
client/verb
Test()
world.Export("irc://irc.esper.net:6669")

Produced this:

Invalid network address in transmission (irc://irc.esper.net:6669)

In response to Tom
The only "issue" from a DLL standpoint is getting appropriate notification from the IRC side of things that there is any data to process at all. You'd essentially address this using a polling mechanism, though. This unfortunately is a common issue with DLLs and BYOND, receiving asynchronous I/O is a little cumbersome.

I may just make a common DM / C pair library to provide a generic set of extensions to the call() interface to abstract that away though.
In response to Stephen001
Please, please do.
In response to Tom
Any word on how this is going?
Page: 1 2