I have a script that goes like !who nickname, it looks up a number from a ini file. I want to also trigger another script via on input.
The script works but the input doesn't. Is there a different way to do:
msg # found $ini(phonebook.ini,owners,%x)
msg # !search $ini(phonebook.ini,owners,%x)
so that the !search will trigger an on input?
[/code]on *:input:#: {
if ($1 == !search && $2) {
if ($2 isnum && !$3) {
if ($hget(NewGameData,$2)) {
msg $chan $2 $+ : $v1
}
else msg $chan No data on $2 $+ .
}
else {
if ($hfind(NewGameData,$2- $+ *,0,w).data > 0) {
if ($hfind(NewGameData,$2- $+ *,0,w).data > 1) {
msg $chan Too many results for $2- $+ . Be more specific, or use the number instead of the name.
}
else {
var %data = $hfind(NewGameData,$2- $+ *,1,w).data
msg $chan %data $+ : $hget(NewGameData,%data)
}
}
else msg $chan No data for $2- $+ .
}
}
[code]
that is not the complete input part but I didn't think you would need all of it, If you do I will paste it.
Thank you for your time