Well its a quote system.
Has a couple commands.
To edit the people who can delete, ban, remove bans. Edit the var on the first line:
var %Quotes.list [nick1] [nick2]...etc
Key:
< >'s-mandatory [ ]'s-Optional Commands: !addquote | Adds a new quote !quote [#] | Accepts the option # to go to directly to that quote #, otherwise msgs a random quote. !delquote <#> | Delete the specified Quote by quote number, $nick must be in %Quote.list to do so. !search | Searchs all the quotes for text and gives first result. To ban or remove a nick from the ban list, right click on their name and got to the menu Add/remove bans. (Thanks napa) Ban is now by their $address, so changing their nick won't help them. Note: $'s are not allowed for obvious reasons. ```mirc on *:LOAD: { set %Quote.list } on *:TEXT:*:#: { if ($1 == !quote) { if ($2) { if ($2 isnum) { if ($read(Quotes.txt,$2) != $null) { msg $chan Quote $chr(35) $+ $2 $+ : $read(Quotes.txt,$2) } else { msg # Line doesn't exist } } else { msg # Please provide a number } } else { set %lines $rand(1,$lines(Quotes.txt)) msg $chan Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines) } } if ($1 == !addquote) { if ($address($nick,1) isin %Quote.ban) { msg # You are banned from adding quotes! } else { if ($2) { if ($chr(36) isin $2-) { msg # Invalid Characters! } else { write Quotes.txt $2- $+ , Added by $nick msg # Added! } } } } if ($1 == !delquote) { if ($nick isin %Quote.list) { if ($2) { if ($read(Quotes.txt,$2) != $null) { write -dl $2 Quotes.txt msg # Line deleted } else { msg # Line doesn't exist } } } } if ($1 == !search) { if ($2) { if ($read(Quotes.txt,w,* $+ $2 $+ *) != $null) { msg # $read(Quotes.txt,w,* $+ $2 $+ *) } else { msg # No results found } } } if ($1 == !lastquote) { set %lines $lines(Quotes.txt) msg # Quote $chr(35) $+ %lines $+ : $read(Quotes.txt,%lines) } } menu nicklist { .Add/Del user's ..$iif($address($1,1) isin %Quote.ban,$style(2)) Add $+($chr(40),$1,$chr(41)): { set %Quote.ban $addtok(%Quote.list,$address($1,1),32) | echo -a User $+($chr(40),$1,$chr(41)) has been added. } ..$iif($address($1,1) !isin %Quote.ban,$style(2)) Del $+($chr(40),$1,$chr(41)): { set %Quote.ban $remtok(%Quote.list,$address($1,1),1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been removed. } ..$iif(!%Quote.ban,$style(2)) $+($chr(91),$numtok(%Quote.ban,32),$chr(93)) $+(User's,$chr(58)) List them: { echo -a $gettok(%Quote.list,1-,32) } } ```hmm, quick question, how would you make it so that it adds to the banlist by hostname/address or something.
That way they can\'t just change their name.
Would it be:
menu nicklist {
.Add/Del user\'s
..$iif($1 isin %Quote.list,$style(2)) Add $+($chr(40),$1,$chr(41)): { set %Quote.list $addtok(%Quote.list,$address($1,1),32) | echo -a User $+($chr(40),$1,$chr(41)) has been added. }
..$iif($1 !isin %Quote.list,$style(2)) Del $+($chr(40),$1,$chr(41)): { set %Quote.list $remtok(%Quote.list,$address($1,1),1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been removed. }
..$iif(!%Quote.list,$style(2)) $+($chr(91),$numtok(%Quote.list,32),$chr(93)) $+(User\'s,$chr(58)) List them: { echo -a $gettok(%Quote.list,1-,32) }
}
Ty for the snippet too.
Lol No one rated it :(
um instead of an alias you can also use menu nicklist to add or remove users like this
menu nicklist {
.Add/Del user\'s
..$iif($1 isin %Quote.list,$style(2)) Add $+($chr(40),$1,$chr(41)): { set %Quote.list $addtok(%Quote.list,$1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been added. }
..$iif($1 !isin %Quote.list,$style(2)) Del $+($chr(40),$1,$chr(41)): { set %Quote.list $remtok(%Quote.list,$1,1,32) | echo -a User $+($chr(40),$1,$chr(41)) has been removed. }
..$iif(!%Quote.list,$style(2)) $+($chr(91),$numtok(%Quote.list,32),$chr(93)) $+(User\'s,$chr(58)) List them: { echo -a $gettok(%Quote.list,1-,32) }
}
then why not have that var as a set var and have it as an on load
like
on *:load:{ set %Quote.list nick1,nick2,nick3 }
then on ur read for that just use
if ($istok(%Quote.list,$nick,44))
or you could add an option to add or remove nicks from that var maybe useing an alias like
alias Anick { set %Quote.list $addtok(%Quote.list,$1,44) }
alias Rnick { set %Quote.list $remtok(%Quote.list,$1,1,44) }