在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):dom96/SimpleIRC开源软件地址(OpenSource Url):https://github.com/dom96/SimpleIRC开源编程语言(OpenSource Language):Haskell 100.0%开源软件介绍(OpenSource Introduction):SimpleIRCSimpleIRC is a simple IRC Library for haskell. InstallationTo install SimpleIRC as a library you need cabal. You can then use ExampleFor an example on how to use the library see example/example.hs and tests/testbot.hs I'm also creating an IRC Bot which uses this library. Take a look at it for more practical usage of the lib. UsageThe first step is to create an IrcConfig datatype. You have to specify the address of the server, the server port, nickname, username, realname, list of channels to join when connected, and a list of events which will be called when certain commands are received from the server. You can specify 0 events, if for some unlikely reason you want your bot to not respond to anything. But in the more likely event when you do want to specify functions, you can do that simply by creating a function with the type of EventFunc
EventFunc has the type of
This function will send "hello" to a channel whenever someone says "|hello". Then you can pass Take a look at the There is one(as of now) event which doesn't take a EventFunc function. You should be able to figure out what type of function it does take by looking at Network/SimpleIRC/Core.hs After you create a IrcConfig you can then call If you have any questions you can ask them @ irc://irc.freenode.net/#() LicenseSimpleIRC is licensed under the BSD3 license. Read the license file for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论