为 UnrealIRCD 编写 IRC 服务
嗯,我一直在寻找这方面的材料,但一无所获。我熟悉 IRC 协议,并且想为我的服务器编写 IRC 服务(在 UnrealIRCD)
我更喜欢PHP,因为我在那里最熟练。谁能给我指出一些好的教程,甚至可以在这里解释一下如何开始? (我只需要基本的协议/语法和服务器设置,我将自己完成实际的功能和能力(希望:P))。
提前致谢。
Well, I've been searching for material for this one, and failed to find anything. I am familiar with the IRC protocol, and I want to write IRC Services for my server (running on UnrealIRCD)
I prefer PHP, as I am most proficient there. Can anyone point me at some good tutorials or even explain here how to start? (I only need the basic protocol/syntax and server settings, I'll do the actual functions and abilities myself (hopefully :P)).
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我的一位朋友已经为 InspIRCd 做了这个。它从未完成,但基础已经开始发挥作用。我们只是通过 Socket-Connection 连接到 IRC 服务器(第一个版本中为 fsockopen,第二个版本中为 socket_create)。
为了进行通信,我们实现了一个 InspIRCd 接口,其中包含协议中规定的特定行。然后核心可以调用这些方法。
A friend of mine me did this one already for InspIRCd. It never was finished, but the basics were working. We simply connected to the IRC server via a Socket-Connection (fsockopen in the first version, socket_create in the second one).
For communication we implemented an interface to InspIRCd with contained the specific lines as stated in the protocol. These methods could then be called by the core.
阅读 Anope 服务的未编译 C 源代码让我找到了正确的方向,尽管对于在哪里查看它内部需要一些尝试和错误。我不记得了,因为很久以前我尝试过自己的 PHP 服务,但是如果服务连接的每个客户端都需要 PING/PONG 回复来保持连接,那么 PHP 不会有点崩溃吗?线程并不是那么好,据我所知,只有 Linux。
Reading uncompiled C source code of the Anope services got me pointed in the right direction, although it's a bit of a trial and error as to where to look inside it. I can't remember since it was quite a while ago when I tried my own PHP services, but if each client the services connects requires a PING/PONG reply to keep the connection alive, then won't PHP kinda fall down? The threading isn't that great, Linux only as far as I can remember.
编辑:天哪,我不知道这个问题有多老了。话虽这么说,有人可能会使用它,所以......回答如下。
我已经用 PHP 完成了这个,所以我可以告诉你它可以完成(源代码未发布)。
话虽这么说,我将在这里向您介绍一个基本核心:
希望这可以帮助您入门!
EDIT: Good Lord, I didn't realize how old this question was. That being said, someone might use it so...answer below.
I've done this in PHP so I can tell you it can be done (source code not released).
That being said, I'll throw a basic core at you here:
Hope this helps you get started!