OliMaylen commented on a Page, server !seen and !idle scripts  -  Apr 20, 2008

Hi there, I\'m new to the site & new to IRC scripting. This is the first time I have studied it & the first time editing it, (learning as I go) so go easy on me if there are glaringly obvious errors.

I really liked this script as it was the only one I could find that used WHOIS to find a user that was not in the channel. I added it to a mIRC bot, (Yourbot IRC Bot 4.5.2) which was intergrated into mIRC v6.2, but the last user action (ie: Kick, Quit, Part etc) database wouldnt function properly & the script would freeze giving the bot client the error message: * Invalid format: $left (line 17, seen.mrc).

After some playing with the code & changing the v6.2 mIRC exe for the new v6.31 exe, the script works exactly as it should for my bot.

Like I said, it worked for me, there may have been a much easier way to sort the problem, but I didn\'t know it. :-) Thought I would share this in case other people had the same problem, or to see if there was an easier way of fixing the problem.

The code I changed was:

raw 402:*: {
  if (%xseen) {
    if (!$hget(xSeen,%xseen.target)) { msg %xseen.chan 12Sorry,4 %xseen.target 12was not found in my database, or on the server. }
    if ($hget(xSeen,%xseen.target)) {
      var %xseen.data $left($hget(xSeen,%xseen.target),1) 
      tokenize 32 $hget(xSeen,%xseen.target)
      if ($1 = Q) { msg %xseen.chan %xseen.target was last seen Quitting (Quit Message: $4- $+ ) $duration($calc($ctime - $3)) ago. }
      if ($1 = S) { msg %xseen.chan %xseen.target was last seen by me on the server $duration($calc($ctime - $3)) ago. }
      if ($1 = K) { msg %xseen.chan %xseen.target was last seen being kicked from $4 (Kick Reason: $5- $+ ) $duration($calc($ctime - $3)) ago. }
      if ($1 = P) { msg %xseen.chan %xseen.target was last seen parting $4 (Part Reason: $5- $+ ) $duration($calc($ctime - $3)) ago. }
      if ($1 = N) { msg %xseen.chan %xseen.target was last seen changing his/her nick to $4 $duration($calc($ctime - $3)) ago. }
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.