简体   繁体   English

用于访问IRC服务器的简单Perl模块

[英]Simple Perl module for accessing IRC servers

I'm trying to write an extremely simple IRC client which sets the topic on a given channel (for which it first needs to identify and gain ops). 我正在尝试编写一个非常简单的IRC客户端,该客户端将主题设置在给定的频道上(它首先需要识别并获得操作)。 Ideally I want to be able to write something like this: 理想情况下,我希望能够编写如下内容:

$client = new IRC::Client(%config);
$client->connect();
$client->identify('password');
$client->join('#channel');
$client->op('#channel'); # gain ops
$client->set_topic('#channel', 'new topic');
$client->disconnect();

Is there a module which supports this limited functionality, with a simple interface? 是否有通过简单的界面支持此受限功能的模块? All the IRC-related modules on metacpan seem to be aimed at people wanting to write fully functional bots - I've looked at Bot::BasicBot , but that seems to want me to subclass the module, and AnyEvent::IRC::Client seems quite low level. metacpan上所有与IRC相关的模块似乎都针对希望编写功能齐全的机器人的人-我看过Bot :: BasicBot ,但这似乎希望我将模块和AnyEvent :: IRC :: Client子类化。似乎水平很低。 I don't want to write event-handling code, just connect, issue a few commands, and disconnect. 我不想编写事件处理代码,只需连接,发出一些命令并断开连接即可。

还考虑Net::Async::IRC

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM