blob: 5b3d894aab9b58c0515fc9b4b9d3f9e02fb6789b (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
bind pubm * "#archivebot *" abc-privmsg
proc abc-privmsg {nick uhost hand chan text} {
if {([string index $text 0] == "!") && (([string index $text 1] != " ") && ([string length $text] != "1"))} {
return 0
}
if {([string match "*@archiveteam/Aramaki" $uhost]) || ([string match "*@hackint/user/h2ibot" $uhost])} {
#if {([string match "*@archiveteam/Aramaki" $uhost] && ([string first ": Job" $text] != -1) && ([string first ": Sorry, I don't know anything about" $text != -1)) || ([string match "*@hackint/user/h2ibot" $uhost])} {}
return 0
}
if {([string match "*@hackint/user/nullbot" $uhost])} {
return 0
}
if {([string match "*@hackint/user/kh2i" $uhost])} {
return 0
}
if {[string index $text 0] == "\001"} {
return 0
}
if {[isop $nick $chan]} {
set nick "@$nick"
} elseif {[isvoice $nick $chan]} {
set nick "+$nick"
}
putserv "PRIVMSG #archivebot-chat :<$nick> $text"
}
bind ctcp * "ACTION" abc-action
proc abc-action {nick uhost hand dest keyword text} {
if {$dest == "#archivebot"} {
if {[isop $nick $dest]} {
set nick "@$nick"
} elseif {[isvoice $nick $dest]} {
set nick "+$nick"
}
putserv "PRIVMSG #archivebot-chat :\001ACTION <$nick> $text\001"
}
}
bind notc * "*" abc-notice
proc abc-notice {nick uhost hand text {dest ""}} {
if {$dest == "#archivebot"} {
if {[isop $nick $dest]} {
set nick "@$nick"
} elseif {[isvoice $nick $dest]} {
set nick "+$nick"
}
putserv "NOTICE #archivebot-chat :<$nick> $text"
}
}
bind out * "% sent" abc-out
proc abc-out {queue text status} {
set botnick $::botnick
if {[botisop "#archivebot"]} {
set botnick "@$botnick"
} elseif {[botisvoice "#archivebot"]} {
set botnick "+$botnick"
}
if {[string match "PRIVMSG #archivebot *" $text]} {
if {[string match "*\\\[remind\\\]*" $text]} {
putserv "PRIVMSG #archivebot-chat :<$botnick> [join [lrange [split $text ":"] 1 end] ":"]"
}
}
if {[string match "NOTICE #archivebot *" $text]} {
if {[string match "*\\\[karma\\\]*" $text]} {
putserv "NOTICE #archivebot-chat :<$botnick> [join [lrange [split $text ":"] 1 end] ":"]"
}
}
}
|