on *:TEXT:*:#: {
if ($1-2 = quote info) {
if (!%waitthreeagain) {
msg # Totaal aantal Quotes: $+(,$lines($+(quotes.,#,.txt)),)
set -u3 %waitthreeagain 1
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
if ($istok($+($me,:) $me,$1,32)) {
if (!%waitthree) {
set -u3 %waitthree 1
if (!$2) msg # $+(,$nick,:) $read($+(quotes.,#,.txt),n)
elseif ($2- !isin $read($+(quotes.,#,.txt), nw, $2-, $readn)) write $+(quotes.,#,.txt) $2-
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
}
Zo is het veel beter.
Hoe jij het bij elseif hebt gedaan zal niet werken omdat je { } mist.
Maar je zou het ook veel makkelijker kunnen doen.
on *:TEXT:*:#: {
if ($1-2 = quote info) {
if (!%waitthreeagain) {
msg # Totaal aantal Quotes: $+(,$lines($+(quotes.,#,.txt)),)
set -u3 %waitthreeagain 1
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
if ($istok($+($me,:) $me,$1,32)) {
if (!%waitthree) {
set -u3 %waitthree 1
msg # $+(,$nick,:) $read($+(quotes.,#,.txt),n)
if ($2- !isin $read($+(quotes.,#,.txt), nw, $2-, $readn)) write $+(quotes.,#,.txt) $2-
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
}
thnx @Vegito heb er weer wat bij geleerd :D
Ik ben er nog redelijk n00b in, Heb allen de if regel nog achter de elsif gezet zodat ie ook reageert als je wel een $2 typt ;)
on :TEXT::#: {
if ($1-2 = quote info) {
if (!%waitthreeagain) {
msg # Totaal aantal Quotes: $+(,$lines($+(quotes/quotes.,#,.txt)),)
set -u3 %waitthreeagain 1
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
if ($istok($+($me,:) $me,$1,32)) {
if (!%waitthree) {
set -u3 %waitthree 1
if (!$2) msg # $+(,$nick,:) $read($+(quotes/quotes.,#,.txt),n)
elseif ($2- !isin $read($+(quotes/quotes.,#,.txt), nw, $2-, $readn)) write $+(quotes/quotes.,#,.txt) $2- | msg # $+(,$nick,:) $read($+(quotes/quotes.,#,.txt),n)
}
else msg # Om flooding te voorkomen: 1 quote om de 3 seconden.
}
}
Maar het werkt wel :D