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
|
; ——————————————————————————————————————————————— ;
; Invite Bot by devilface, thanks to ohad2121 for help :)
; This invite bot work only on QuakeNet (Q-Chanlev)
;
; Usefull commands:
; 1. !setchan <#channel> - to set invite channel.
; 2. !unsetchan - to unset invite channel.
; 3. !invite <nick> - to invite nick.
; 4. !remove <nick> - to remove invite.
; 4. !list - to get invited list (from Q-Chanlev).
; 6. !commands - to get commands from bot.
;
; To add/remove owners right click in nicklist —› Invite bot —› add/remove owner
; ——————————————————————————————————————————————— ;
alias theme { return 2(12 $+ $1- $+ 2)1 }
on owner:text:*:*:{
var %t = $iif(#,#,$nick)
if ($left(%t,1) != $chr(35)) {
if ($1 == !setchan) {
if ($2 == %invite.chan) { msg %t $theme(INVIE-ERROR) channel is already %invite.chan }
elseif ($2) { set %invite.chan $2 | .msg q chanflags %invite.chan +k | msg %t $theme(INVITE) Done, the invite channel seted to: $2 $+ . }
else { msg %t $theme(INVITE-ERROR) Usage: !setchan <#channel> }
}
elseif ($1 == !unsetchan) {
if (%invite.chan) { .msg q chanflags %invite.chan -k | msg %t $theme(INVITE) Done, the invite channel unseted. | unset %invite.chan }
else { msg %t $theme(INVITE-ERROR) channel is not seted yet. }
}
elseif ($1 == !commands) {
msg %t $theme(INVITE-COMMANDS) !setchan <#channel> $chr(124) !unsetchan $chr(124) !invite <nick> $chr(124) !remove <nick>.
}
}
if ($chan == %invite.chan || $left(%t,1) != $chr(35)) {
if (!%invite.chan && $regex($1,/^!(invite|remove|uninvite|list)$/i)) { msg %t $theme(INVITE-ERROR) channel is not seted yet. }
elseif ($1 == !invite) {
if ($2) { .msg q chanlev %invite.chan $2 +k | msg %t $theme(INVITE) Done, invite sented to $2 $+ | .invite $2 %invite.chan | msg $2 Hello $2 $+ , you are invited to %invite.chan $+ . }
else { msg %t $theme(INVITE-ERROR) Usage: !invite <nick> }
}
elseif ($1 == !remove) {
if ($2) { .msg q chanlev %invite.chan $2 -k | msg %t $theme(INVITE) Done, $2 was removed from invited list. }
else { msg %t $theme(INVITE-ERROR) Usage: !remove <nick> }
}
elseif ($1 == !list) { unset %invite.list | set %invite.getting.list %t | .msg q chanlev %invite.chan }
}
}
on ^*:notice:*:*:{
if (%invite.getting.list && $nick == q) {
if (%qchan.error) { halt }
if (end of list. == $1-3) { unset %qchan.getting }
elseif ($1 == total:) { $iif(%invite.list,msg %invite.getting.list $theme(INVITED-LIST) $replace(%invite.list,$chr(32),$chr(44))) | unset %invite.list | unset %invite.getting.list }
elseif ($1-2 == Can't find) { .timer 1 0 qchan.error %qchan.target its unknown or suspended channel. | set %qchan.error 1 }
elseif ($1-2 == You do) { .timer 1 0 qchan.error You dont have sufficient access on $8 to use chanlev. | set %qchan.error 1 }
elseif ($1-2 == account, or) { .timer 1 0 qchan.error You must be authed to use this dialog. | set %qchan.error 1 }
elseif (!$regex($1-,/^(Known users|End of|Username.*flags)/i) && k isin $2) {
set %invite.list %invite.list $1
if ($len(%invite.list) >= 800) { msg %invite.getting.list $theme(INVITED-LIST) $replace(%invite.list,$chr(32),$chr(44)) }
}
halt
}
}
menu nicklist {
Invite bot
.Add owner ( $+ $$1 $+ ): .guser owner $$1 2 | echo -at $theme(INVITE) Done, $$1 was added to Invite-bot owner list.
.Remove owner ( $+ $$1 $+ ): .ruser owner $$1 2 | echo -at $theme(INVITE) Done, $$1 was removed from Invite-bot owner list.
} |