mIRC Home    About    Download    Register    News    Help

Topic Options
#60304 - 14/11/03 03:43 PM Logs
Syperus Offline
Ameglian cow

Registered: 17/02/03
Posts: 31
Hey im making a logger and after many days, im tired of it so thought id post it on here to see if anyone else can find the problem. It doesn't return any errors, just doesn't do anything.

****code****
on *:text:*:#: {
if (%loggin) {
write $strip($mircdirlogs\ $+ $chan $+ .log $1-,burc)
}
}
***EOF***
ive even taken out $strip and set a .txt file and it still doesn't work. Basically just tryin to create a .log file and have the text sent to there. Any idea's? Thanks

Top
#60305 - 14/11/03 04:12 PM Re: Logs
LocutusofBorg Offline
Hoopy frood

Registered: 23/03/03
Posts: 1271
Loc: Sunnydale, CA
Did you test if the variable has a value? Don't assume it has, put in a test. Before your if statement you could do


echo -a -> %loggin


Then put in a text as first command in your if statement to see if that triggers. Same for the event itself, maybe the event doesn't trigger.

Next, put a echo before the actual line that doesn't work to see what command your script tries to execute.

If all these steps fail, it's gonna be harder to find the problem, and it usually takes careful study of the identifiers you use in the helpfile.

What this all means? You are abusing the $strip. $strip is intended to strip control codes from a string. Your string is $mircdirlogs\ $+ $chan $+ .log $1-,burc. However, the actual string you need is $1-.
The following change fixed it for me


write $mircdirlogs\ $+ $chan $+ .log $strip($1-,burc)
_________________________
DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius

Top