mIRC Home    About    Download    Register    News    Help

Print Thread
#78221 06/04/04 08:25 PM
Joined: Nov 2003
Posts: 6
Y
yuveth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Nov 2003
Posts: 6
hi - helppppp lol
it sends to everyone on notify.. and i dont want that - just the specific person - any ideas please ? wink

On *:Text:!mail *:?:{
/write -c 1 $+ $nick $+ .txt From: $nick $3- $fulldate
/msg $nick your message has been saved ..
/set % $+ $2 $+ message $true
/notify $2
halt
}

On *:notify:{
if ( % $+ $nick $+ message == $true )
{ //play $nick c:\program files\mirc\ $+ $nick $+ .txt }

#78222 07/04/04 02:53 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
In your on notify event, use either of these:

[*] $eval($+(%,$nick,message),2)
[*] % [ $+ [ $nick ] $+ [ message ] ]

The role of $eval in the first method and the evaluation brackets in the second method is to perform an extra evaluation of the string you have concatenated and to see if as a variable it holds $true.

Anyway, I think that adding occasional recipients to the notify list is a bad idea, because eventually it will make a laggy bot. Remember - the entire notify list is exchanged with the server on connect, and it's even worse when it comes to ancient software like Undernet's or EFNet's which your client has to query on a constant basis. It would be much better, in my opinion, to do this "new mail check" when the user joins the channel where your bot resides.

#78223 07/04/04 05:24 PM
Joined: Nov 2003
Posts: 6
Y
yuveth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Nov 2003
Posts: 6
hi .. i still cant get it to work wink

any other ideas anyone please?

#78224 07/04/04 09:19 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
There is another mistake in the /write line: the file should be named $2 and not $nick. Try this:

write $2.txt From: $nick $3- $fulldate

If you still have no luck, put some checkpoints in your script, like /echo -a On Notify Triggered, etc. to track down the problem.

#78225 08/04/04 12:50 PM
Joined: Mar 2004
Posts: 54
Z
Zed Offline
Babel fish
Offline
Babel fish
Z
Joined: Mar 2004
Posts: 54
Code:
On *:Text:!mail *:?:{
  ...
  /notify $2
  ...
}

Why "$2" and not "$nick" ?

Code:
On *:notify:{
  if ( % $+ $nick $+ message == $true )
  { //play $nick c:\program files\mirc\ $+ $nick $+ .txt }
  ...
}


Try
Code:
if ( [ [ $+(%,$nick,message) ] ] == $true )

#78226 10/04/04 09:32 PM
Joined: Nov 2003
Posts: 6
Y
yuveth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Y
Joined: Nov 2003
Posts: 6
ok.. i tried all the suggestion .. and thank you very much too !

BUT- .. i dont have a problem writing a file, i have a problem playing it.. it wont play out at all.. i get this ->

* /if: insufficient parameters (line 9, script1.ini)

if ( % $+ $nick $+ message == $true ) <-- this is bad line duno what to do with it
also tried this ->
if ( [ [ $+(%,$nick,message) ] ] == $true )



thank you again !!

Last edited by yuveth; 10/04/04 09:43 PM.

Link Copied to Clipboard