Here are some examples.
<Sumsar> .qflags #test
<botnick> I'm not added to Q in #test
<Sumsar> .qflags #sp00fed
<botnick> I'm added to Q in #sp00fed with +ao
If authname is not set, the bot will not tell you what flags it got.
Things to change:
- Authname
I hope you can use it, if you find any bugs error please post them here.
- Code: Select all
alias -l db { return qflags.db }
alias -l authname { return Authname }
on *:TEXT:.qflags*:#: {
if (!$2) {
.msg $nick Syntax: $1 <#channel>
}
else {
.set %qflags.target $chan
.write -c $db
if ($left($2,1) == $chr(35) && $chr(44) !isin $2) {
.msg Q chanlev $2
}
}
}
on *:NOTICE:*:?: {
if ($nick == Q) {
.write $db $1-
if (*You do not have sufficient access on* iswm $1-) || (*End of list.* iswm $1-) {
checkflag %qflags.target
}
}
}
alias checkflag {
var %x = 0, %z = $lines($db)
while (%x <= %z) {
var %line = $read($db,%x)
if (*You do not have sufficient access on* iswm %line) {
var %channel = $gettok(%line,8,32)
var %message = I'm not added to Q in %channel
}
elseif (*Known users on* iswm %line) {
var %c = $gettok(%line,4,32)
var %channel = $remove(%c,$right(%c,1))
var %message = I'm added to Q in %channel
}
if (*/*/*:* iswm %line) && ($authname == $gettok(%line,1,32)) {
var %message = %message with $gettok(%line,2,32)
}
inc %x
}
msg $1 %message
}