mIRC Home    About    Download    Register    News    Help

Print Thread
#74203 07/03/04 02:41 AM
Joined: Mar 2004
Posts: 8
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Mar 2004
Posts: 8
When nicks are saved (at the bottom of the code) in an ini file, the left and right brackes appear to be converted into ~'s
______________
[~NuB2~Deadmeat]
date=Sat Mar 06 18:56:12 2004
part=no
message=Ping timeout
me=*[NuB2]Deadmeat is asleep - soundly -shuttup laugh
chan=#Rookie_Area
_______________

When I use the !seen [NuB2]Deadmeat command on my bot, nothing is generated unless he is on-chan. Other Team members ([NuB]User) are sometimes displayed, sometimes not, and non team members (anyone) are always shown. Can someone look at this code and see if there might be a reason for this?
code
___________________________________________
#sen on
on 1:text:*seen*:#: {
if ($1 == %c $+ seen) {
if ($2 == $null) { .notice $nick 5Correct Usage: %c $+ seen <nick> | halt }
if ($2 == $me) { .msg $chan Of course I'm here $nick $+ . | halt }
if ($2 == $nick) { .msg $chan Yes, $nick $+ , you are here. | halt }
if ($2 ison $chan) { .msg $chan $2 is in this chan already. | halt }
if ($readini ini\users.ini $2 date == $null) { .msg $chan Sorry $nick $+ , I have not seen $2 | halt }
else {
if ($readini ini\users.ini $2 me == $null) {
if ($readini ini\users.ini $2 part == yes) { .msg $chan $2 was last seen parting [ $readini ini\users.ini $2 chan ] $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago. }
else { .msg $chan $2 was last seen quiting $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago with the message: " $+ [ $readini ini\users.ini $2 message ] $+ ". }
}
else {
if ($readini ini\users.ini $2 part == yes) { .msg $chan $2 was last seen parting [ $readini ini\users.ini $2 chan ] $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago. | .msg $chan $+ $2 $+ 's last action was: $+ [ $readini ini\users.ini $2 me ] }
else { .msg $chan $+ $2 was last seen quiting $+ $duration($calc($ctime($fulldate)-$ctime($readini ini\users.ini $2 date))) ago with the message: " $+ [ $readini ini\users.ini $2 message ] $+ ". | .msg $chan $+ $2 $+ 's last action was: $+ [ $readini ini\users.ini $2 me ] }
}
}
else { halt }
}
}
#sen end
#sjsen on
on 1:QUIT:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick part no | writeini -n ini\users.ini $nick message $1-
on 1:PART:#:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick chan $chan | writeini -n ini\users.ini $nick part yes
on 1:ACTION:*:#:writeini -n ini\users.ini $nick me * $+ $nick $1-
#sjsen end
____________________________________________

Thx to all that have given help to all the ppl w/questions on this forum. I have been reading, and learing slowly from your responces.

RC

#74204 07/03/04 05:01 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Maybe try using proper syntax

e.g.
  • if ($readini(ini\users.ini,$2,date) == $null)

#74205 08/03/04 07:13 AM
Joined: Mar 2004
Posts: 8
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Mar 2004
Posts: 8
Thx Iori, formatting was the problem. Now, one last addition for this and I think I'm done with it. I want to add the users ip address (user@12.34.56.78) to the saved data. I've looked, but cant find the correct format of "address".

on 1:PART:#:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick chan $chan | writeini -n ini\users.ini $nick part yes | writeini -n ini\users.ini $nick $address($nick,2)

this does not seem to be correct either


Thx again,

RC

#74206 08/03/04 07:17 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
If you're looking for an identifier, a lone $address is what you need.

#74207 09/03/04 04:50 AM
Joined: Mar 2004
Posts: 8
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Mar 2004
Posts: 8
Ok, it works for the QUIT, but I have tried it on the PART:

on 1:PART:#:/writeini -n ini\users.ini $nick date $fulldate | writeini -n ini\users.ini $nick chan $chan | writeini -n ini\users.ini $nick part yes | writeini -n ini\users.ini $nick message $1- | writeini -n ini\users.ini $nick IP $address

and get this error:

*/writeini: insufficent parameters

Any thoughts?

#74208 09/03/04 06:23 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
  • writeini -n ini\users.ini $nick message $1-
should be
  • writeini -n ini\users.ini $nick message $iif($0,$1-,None)


Link Copied to Clipboard