mIRC Home    About    Download    Register    News    Help

Print Thread
Logs #60304 14/11/03 03:43 PM
Joined: Feb 2003
Posts: 31
S
Syperus Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Feb 2003
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

Re: Logs #60305 14/11/03 04:12 PM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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