Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 38 lines (29 sloc) 0.95 kB
2afc3fc @sevk add file
authored
1 #!/usr/bin/ruby -w
3331feb @sevk 代码升级到ruby1.9
authored
2 # coding: utf-8
2afc3fc @sevk add file
authored
3
4609a37 添加自动ban功能.
kk authored
4 #irc 服务器设置
2afc3fc @sevk add file
authored
5 $server = 'irc.freenode.net'
6 $port = 6667
54890f6 优化错误提示.
kk authored
7 $nick = "kk-bot#{rand(100)}"
2afc3fc @sevk add file
authored
8 $pass = 'ikk-bot'
9 $channel = '#sevk'
1e00200 @sevk 加入全局bot功能开关设置.
authored
10 $charset = 'UTF-8' # irc频道的字符设置
7a6acc8 @sevk 小优化.
authored
11 $name = "bot svn ver bot :svn Ver bot"
dbba19c @sevk .
authored
12
4609a37 添加自动ban功能.
kk authored
13 #bot功能设置
5b49934 小修改。
kk authored
14 $need_Check_code = 1
15 $need_say_feed = 0
db569cf 取标题优化.
kk on ub1 authored
16 $saytitle = 1
dbba19c @sevk .
authored
17 $bot_on = true # bot 功能开关
fef3e00 test alice_say
kk on ub1 authored
18 $minsaytime = 6 #最快6秒发言一次
19 #puts "Min say time=#{$minsaytime}"
7a6acc8 @sevk 小优化.
authored
20
21 # 调试开关,会显示很多信息,比如 rchardet 的内容
fef3e00 test alice_say
kk on ub1 authored
22 $debug = false
2afc3fc @sevk add file
authored
23
c1c3f41 为ruby1.8添加一些ruby1.9的语法。以让代码兼容1.8和1.9
kk authored
24 #本地显示设置
1e00200 @sevk 加入全局bot功能开关设置.
authored
25 $local_charset = 'UTF-8'# windows 平台可以设置为 'gb2312 或 gb18030'
6437cd4 @sevk 小优化.
authored
26 $local_charset = 'GB18030' if os_family == 'windows' # 也可以自动判断是不是windows系统
27
54890f6 优化错误提示.
kk authored
28 $ignore_action = "quit join" #过滤消息类型
faaa0fe 小优化.
kk authored
29 $ignore_nick = ":mayli_ :mayli__ " #过滤nick, 要在前面添加冒号:
30 puts $ignore_nick #打印过滤的nick
dbba19c @sevk .
authored
31
769ff43 @sevk 断线自动重连。
authored
32 #client 功能
33 $client = true
34
d052313 @sevk 小优化.
authored
35 $proxy_addr = '127.0.0.1'
c9b2b57 小优化.
kk on ub1 authored
36 $proxy_port = 65534
97f5fa6 @sevk 优化.
authored
37
Something went wrong with that request. Please try again.