Skip to content
MSN Addons

How long does host stayed in the room?

A TG007 community discussion started by Piccard.

Discussion 4 posts
Page 1 of 1
Open
Topic #3913 · 4 published posts · 816 views

Thanks in advance for any help. I know nothing in terms of building a new script, so, I ask you guys if is possible to have a code for MSN room chat like this:

1- Host comes to the room (code gets the time).

2- Host goes to coffee (code gets the time unavailable)

3- Host comes back from coffee (code gets the time)

4- Host goes away or host was disconnected, etc (code gets the time)

5- Code makes calculation how long host stayed available in the rom.

6- Code classifyes hosts according to staying available in the room (like a rank).

7- Code has a command or a table where is possible to have hosts rank.

 

Piccard

Lot of scripts have that in one form or another, The older scripts like Kenobi and Hybrid did that, Newer scripts or more intune with other things But can be set up to do that, Just give them a try and see what scripts you find best to suit your needs

on *:op:#:{
 if ($nick !isin $readini(optime.ini,opnicks,nicks,$nick)) writeini opnicks $+($v2,$chr(44),$nick)
 if (!$readini(optime.ini,ops,$nick)) writeini optime.ini ops $nick 0
 set %optime. [ $+ [ $opnick ] ] $time(h:n)
}

;apply this command to part, quit, kick, etc
on *:deop:#:{ $optime($nick) }

alias optime {
 var %a = $readini(optime.ini,ops,$1)
 var %t = $calc($gettok(%optime. [ $+ [ $1 ] ],1,58) * 60) + $gettok(%optime. [ $+ $1 ] ],2,58)
 writeini optime.ini ops $1 $calc(%a + %t)
 opranks
}

That should work for calculating the total time in available op status (mins) but I don't have the time for making an alias for ranking each operator atm.

 

Tks everybody, I have been using script like Hybrid and the code I asked is not included there, that's why I asked for it here. I tried to use the code offered by Cleric and it seems to be working but there is no information about what happen after log for Ops. Being honesty, I don't know how to build "opranks", for instance.

I am sorry to pester you guys, but I am a newbee in terms of code, so I believe to find here what I am looking for.

 

Thanks again.

 

Piccard