; Tell System 2.0 (2010-Oct-30)
;
; /msg [botname] !tellban [nick] [reason] = ban's nick with reason
; /msg [botname] !tellunban [nick] = unbans nick
; /msg [botname] !tell [nick] [message] = sends offline message to nick
; /telladd [nick] = Allows [nick] to use the !tellban and !tellunban functions.
; /telldel [nick] = Deletes [nick] rights, they will no longer be able to use ban/unban.
on *:text:!tell*:#: { /tellsystem $1- | .notice $nick Note: You can also do this privately like so: "/msg $me $1-5 .." }
on *:text:!tell*:?: { /tellsystem $1- }
alias tellsystem {
var %block 0
if (bastard isin $1-) var %block bastard
if (wanker isin $1-) var %block wanker
if (cunt isin $1-) var %block cunt
if (nigga isin $1-) var %block nigga
if (nigger isin $1-) var %block nigger
if (queer isin $1-) var %block queer
if (%block != 0) {
.notice $nick [Tell] Abusive/Racist messages cannot be sent via this Tell System!
writeini TellSys.txt TellSysBans $address($nick,3) Attempting to send Racist/Abusive messages [Added $fulldate $+ ]
}
%tellchknickban = $readini(TellSys.txt,TellSysBans,$nick)
%tellchkhostban = $readini(TellSys.txt,TellSysBans,$address($nick,3))
if (%tellchknickban != $null) set %tellchkban %tellchknickban
if (%tellchkhostban != $null) set %tellchkban %tellchkhostban
if (%tellchkban != $null) {
.notice $nick [Tell] YOU ARE BANNED!, Reason: " $+ %tellchkban $+ "
unset %tell*
halt
}
if ($2 = $me) {
.notice $nick [Tell] I am a Bot, I do not accept messages!
halt
}
if ($1 = !tellban) {
%tellstaff = $readini(TellSys.txt,TellSysStaff,$address($nick,13))
if (%tellstaff != $nick) {
.notice $nick [Tell] Access Denied To Function $1
unset %tell*
halt
}
if ($address($2,2) = $null) {
.notice $nick [Tell] Check nickname spelling and try again.
halt
}
if ($3 = $null) {
.notice $nick [Tell] Usage: !tellban [nick] [reason for ban] (eg. !tellban trouble abusing the system)
halt
}
.notice $nick [Tell] Banning User $2 ( $+ $address($2,3) $+ ) with Reason: $3-
writeini TellSys.txt TellSysBans $address($2,3) $2 $+ :- $3- [Added $fulldate $+ ]
halt
}
if ($1 = !tellunban) {
%tellstaff = $readini(TellSys.txt,TellSysStaff,$address($nick,13))
if (%tellstaff = $null) {
.notice $nick [Tell] Access Denied To Function $1
unset %tell*
halt
}
if ($2 = $null) {
.notice $nick [Tell] Usage: !tellunban [nick]
halt
}
.notice $nick [Tell] Un-Banning User $2 ( $+ $address($2,3) $+ )
remini TellSys.txt Bans $address($2,3)
halt
}
if ($1 = !tell) {
unset %tell*
%tellchkhost = $address($2,2)
if (%tellchkhost != $null) {
.notice $nick [Tell] $2 is currently online, Use the PM System!
halt
}
if (tellsys isin $2) {
.notice $nick [Tell] You cannot send messages to 'TellSys...' as this is used internally by the Tell System.
halt
}
if ($4 = $null) {
.notice $nick [Tell] Usage: !tell [nick] [message]
halt
}
%tellcount = $readini(TellSys.txt,$2,Count)
%telluserc = $readini(TellSys.txt,$2,$nick)
if (%tellcount > 4) || (%telluserc > 2) {
.notice $nick $nick $+ : You cannot send any more messages to " $+ $2 $+ "
unset %tell*
halt
}
inc %tellcount 1
var %tellmsg $strip($3-)
.notice $nick $nick $+ : Got Your Message For " $+ $2 $+ " >> " $+ %tellmsg $+ "
writeini TellSys.txt $2 LastUsed $fulldate
writeini TellSys.txt $2 Count %tellcount
writeini TellSys.txt $2 $nick %tellcount
writeini TellSys.txt $2 %tellcount %tellmsg [from $nick on $fulldate $+ ]
unset %tell*
}
}
alias telladd {
if ($address($1,13) = $null) {
echo -a [Tell] You cannot add " $+ $1 $+ " - they are offline, or do not exist.
halt
}
if ($2 = $null) {
echo -a [Tell] Usage: /telladd [nick] yes - Adds [nick] and allows them to use !tellban/!tellunban functions. (yes = confirm action)
halt
}
echo -a [Tell] Adding & Notifying User $1 ( $+ $address($1,13) $+ )
writeini TellSys.txt TellSysStaff $address($1,13) $1
.msg $1 [Tell] You have been added to the Tell Staff List, This enables you to use the following commands:
.msg $1 * /msg $me !tellban [nick] [reason] - Adds nick to the Ban System with the Reason specified
.msg $1 * /msg $me !tellunban [nick] - Reverses the above command.
halt
}
alias telldel {
if ($2 = $null) {
echo -a [Tell] Usage: /telldel [nick] yes - Removes [nick] and prevents them from using !tellban/!tellunban functions. (yes = confirm action)
halt
}
echo -a [Tell] Removing Staff Member $1 ( $+ $address($1,13) $+ )
remini TellSys.txt TellSysStaff $address($1,13)
halt
}
on *:join:#: {
unset %tell*
%tellcount = $readini(TellSys.txt,$nick,Count)
if (%tellcount != $null) {
.msg $nick [Tell] You have %tellcount new messages..
:read
inc %tellcnt 1
%tellmsg = $readini(TellSys.txt,$nick,%tellcnt)
.msg $nick Message %tellcnt of %tellcount = %tellmsg
if (%tellcnt < %tellcount) goto read
remini TellSys.txt $nick
unset %tell*
.msg $nick ** To send a reply: /msg $me !tell [Nick] [Message]
remini TellSys.txt $nick Count
remini TellSys.txt $nick
unset %tell*
}
unset %tell*
}