on *:TEXT:!add*:#:{
if ($nick ison $chan) {
.msg # $nick has placed $2 on the hitlist for $3.
/write c:\hitlist.txt $nick has placed $2 on the hitlist for $3. $date
}
}
- The trigger text should be
!add & (The & means that there must be a second parameter ($2) before it will attempt to execute the code)
- This isn't a problem, but the / in /write is not needed. / (for commands) is never needed in remotes.
- Since this is triggered by another user, $nick will always be on the channel so theres no reason to be checking this
- What if $2 is not currently on the channel? Or better yet, $2 is some random jibberish.
- $3, I assume is some time duration but you're not doing any checking to see if its valid or not
on *:TEXT:!clear*:#:{
if ($nick isop $chan) {
/write -c c:\hitlist.txt ####HitList####
.msg # $nick has cleared the hitlist. So if it gets messed up, blame $nick .
}
}
- The trigger text should be
!clear- This isn't a problem, but the / in /write is not needed. / (for commands) is never needed in remotes.
on *:TEXT:!del*:#:{
if ($nick isop $chan) {
/write -d$2 c:\hitlist.txt
.msg # $nick has deleted line $2 of the hitlist.
}
}
- The trigger text should be
!del &- Again, you're not validating $2 here, what if its not in the list?
- And once more, the / is not needed.
For all
- You should make use of userlevels here, so that not everyone can use these commands
- Why post this here? You already had another topic for this same script.