mIRC Home    About    Download    Register    News    Help

Print Thread
#181564 26/07/07 06:57 PM
Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Hi...

I need a simple bot script for the !seen command
that will tell how many days, hours, minutes, seconds
the bot last saw the chatter...

The bot should respond by "describe".

Thanks in advance.

Last edited by ispukikoy; 26/07/07 06:58 PM.
ispukikoy #181565 26/07/07 07:05 PM
Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Code:
on 1:text:!seen *:#channel:{
  if $2 !ison $chan {
    if $($+(%,seen.,$2),2) {
      describe $chan $2 was last seen on $($+(%,seen.,$2),2)
    }
    else describe $chan $2 has not been seen by me!
  }
  else describe $chan $2 is here right now goofball!
}
on 1:join:#chan:{
  set %seen. $+ $nick $fulldate
}
on 1:quit:{
  set %seen. $+ $nick $fulldate
}
on 1:part:#chan:{
  set %seen. $+ $nick $fulldate
}


untested and very basic!

btk

Last edited by billythekid; 26/07/07 07:09 PM.

billythekid
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
on 1:kick:#chan:{
set %seen. $+ $knick $fulldate
}

Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Originally Posted By: billythekid
Code:
on 1:text:!seen *:#channel:{
  if $2 !ison $chan {
    if $($+(%,seen.,$2),2) {
      describe $chan $2 was last seen on $($+(%,seen.,$2),2)
    }
    else describe $chan $2 has not been seen by me!
  }
  else describe $chan $2 is here right now goofball!
}
on 1:join:#chan:{
  set %seen. $+ $nick $fulldate
}
on 1:quit:{
  set %seen. $+ $nick $fulldate
}
on 1:part:#chan:{
  set %seen. $+ $nick $fulldate
}


untested and very basic!

btk


This script is not working. frown
I created a myownstuff.mrc file
and loaded it on the remotes, logout and reconnected
and re joined a channel, but the bot is not responding
to any !seen frown

ispukikoy #181588 27/07/07 09:46 AM
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
This script is working. Next time, replace #channel, #chan in the code with your channel(s).

ispukikoy #181589 27/07/07 09:54 AM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Hmm..

ispukikoy #181594 27/07/07 12:44 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
You can replace #chan in each of those events with one channel or multiple channels separated by commas #chan1,#chan2,#chan3 or replace each with just # if you want it for all channels you're on. Use your own channel names of course.

ispukikoy #181607 27/07/07 03:14 PM
Joined: Jul 2007
Posts: 30
I
Ameglian cow
OP Offline
Ameglian cow
I
Joined: Jul 2007
Posts: 30
Thank you very much everyone for all the help. cool


Link Copied to Clipboard