on *:TEXT:-bug:#YourChannelHere:{
if (%noflood.bughelp) {
set -u3 %noflood.bughelp 1
.notice $nick Search syntax: -findbug <name>
}
}
on 10:TEXT:-addbug *:#YourChannelHere:{
if (!$6) {
.notice $nick -bugadd missing parameters.
.notice $nick Syntax: -bugadd <name> <location> <month> <time> <money>
}
else {
writeini bug.ini $2 Location $3
writeini bug.ini $2 Month $4
writeini bug.ini $2 Time $5
writeini bug.ini $2 Money $6
.notice $nick Added $2 to the database.
}
}
on 10:TEXT:-rembug *:#YourChannelHere:{
if ($readini(bug.ini,n,$2,Location)) {
remini bug.ini $2
.notice $nick Removed $2 from the database.
}
else {
.notice $nick No bug named $1
}
}
on *:TEXT:-findbug *:#YourChannelHere:{
if (!%noflood.findbug) {
if ($readini(bug.ini,n,$2,Location)) {
set -u5 %noflood.findbug 1
.notice $nick The name of this bug is $2
.notice $nick The location of this bug is $readini(bug.ini,n,$2,Location)
.notice $nick The month that this bug appears is in $readini(bug.ini,n,$2,Month)
.notice $nick The time when this bug is catchable is $readini(bug.ini,n,$2,Time)
.notice $nick This bug is worth $readini(bug.ini,n,$2,Money) bells.
}
}
}