Help - Search - Members - Calendar
Full Version: Observe users plugin?
StealthBot.net > StealthBot > Scripting and Plugins > Plugin Projects
Pages: 1, 2, 3
The-Black-Ninja
It started off with this plugin:

http://www.stealthbot.net/board/index.php?showtopic=39017

I think I can turn this into so much more. I want to maybe, make a clan management plugin kind of like CRS, but this one logs activities of users. I want to try to make it log the amount of times a user joins, talks, commands used, etc., so it can help clan leaders figure out who is actively seeking an interest in the clan and who wants nothing to do with other members, just bot commands.

Think this is a good idea? Any suggestions?
Swamp_Demon15
I think it is a really good idea..

I think you could add the Recruit Plug into it also..

Sooo. When some1 joins.. they automatically start on the first CRS level.. Ya know.


I WOULD USE IT
The-Black-Ninja
I was thinking this is more like a "who just wants a clan tag beside their name" thing. I'm just wondering if there's anything else people would want this plugin to keep a watch on.
Be-Eazie
My Clan would take great interest in that if u were to do it.
The-Black-Ninja
I'm also going to be logging which commands users use and how many times total they've used it. This can also can be used in conjunction with the messages sent and time AFK, especially if clans have hostbots connected through their Stealthbot.
The-Black-Ninja
Okay, sorry it took so long. Lots of school work this week and the flu -.- All commands are the same (mosttoday, ct, ctrank <#>, etc.) and were improved, with the addition to this command:
QUOTE
/activity the_black_ninja
[20:29:34.545] the_black_ninja has joined 4 times, has been 13 mins/13 secs AFK out of a total 15 mins/37 secs. Last time spent: 11 mins/37 secs. Cmds used: 2 (5 total uses), Fav. Cmd: time (3 uses)

Is there anything else you were wanting to see?
Swamp_Demon15
Its OK Ninja.. Wondering why I haven't seen many posts by you... I thank that will be great
The-Black-Ninja
Whoops, forgot to add this:
QUOTE
[21:04:31.670] the_black_ninja has joined 6 times, has been 13 mins/13 secs AFK out of a total 15 mins/37 secs. Last time spent: 11 mins/37 secs. Words typed: 5, Messages sent: 3 (Avg. words/msg: 2). Cmds used: 2 (5 total uses), Fav. Cmd: time (3 uses)
Tanxs
QUOTE(The-Black-Ninja @ Jan 29 2009, 05:56 PM) *

It started off with this plugin:

http://www.stealthbot.net/board/index.php?showtopic=39017

I think I can turn this into so much more. I want to maybe, make a clan management plugin kind of like CRS, but this one logs activities of users. I want to try to make it log the amount of times a user joins, talks, commands used, etc., so it can help clan leaders figure out who is actively seeking an interest in the clan and who wants nothing to do with other members, just bot commands.

Think this is a good idea? Any suggestions?


Hey Ninja... Is this script up and running? If so, could I possibly get it? I would love to use this for my Clan.
The-Black-Ninja
Hmm...thought I already posted it somewhere...oh well, here it is:

If there's anything else you would like to see, let me know :)

EDIT: The attached version of this plugin requires you to delete your previous database and start fresh. The reason for this is because of the heavy alterations required for the option to view weekly statistics about your channel, including average commands used and messages sent per time of day (kind of like ClanGnome did when it displayed results on its website).
Tanxs
Tyvm Ninja!!! Awesome as usual!!!
Be-Eazie
Hey Ninja i updated from the last one I had before u added the extra commands, and I'm gettin this error, for the record i did delete all old databases and old plugin and start fresh sad.gif

QUOTE
[8:04:57 PM] UserJoins Call Error On File> C:\Program Files\StealthBot\plugins\chanact.txt
[8:04:57 PM] Error Number: 450 Description: Wrong number of arguments or invalid property assignment
The-Black-Ninja
Try now.
Be-Eazie
Seems to be working now. Look forward to trying it out, will let you know if we think of anything worth adding. Gj as always
Tanxs
I got no error from her first post of the code.. And its wonderful!! An absolute must have I think.
The-Black-Ninja
QUOTE(Tanxs @ Feb 15 2009, 10:34 PM) *
I got no error from her first post of the code.. And its wonderful!! An absolute must have I think.
That's cause you have the Beta and the original post had beta arguments in there tongue.gif

I'm pretty sure I can still take this further, I just don't know how yet...but I'm glad to hear it's working like it should! biggrin.gif
Style
can you impletment something like the seen script?
so you can see when a user was in the channel for the last time and not only how long
The-Black-Ninja
Yup! It's already being recorded, however it's not being displayed, so this is an easy addition. Would you like it as a separate command? If it's a separate command, I could tack on some more information regarding that last seen stuff because there's no real output going on.
Tanxs
QUOTE(The-Black-Ninja @ Feb 16 2009, 09:20 AM) *

Yup! It's already being recorded, however it's not being displayed, so this is an easy addition. Would you like it as a separate command? If it's a separate command, I could tack on some more information regarding that last seen stuff because there's no real output going on.


Yes I would. Iv been playing around with this since you gave it to me!!! Its wonderful. I was wondering something myself too... Could it also be used like the !afk script? Possibly... allow users to set them selves as AFK with a little quick note... That would be very nice!!!
Style
something like

.lastseen <user>
-> User was last seen leaving this channel 4 hours and 7 minutes ago. he stayed here for 4min and 3sec.
Be-Eazie
Im wondering if the counters are all workin correctly, Im pretty sure im getting some wrong outputs.

QUOTE

[4:39:17 PM] <iWIN.Nimbus> ganjen has joined 2 times, has been 3 hrs/12 mins/31 secs AFK out of a total 9 mins/30 secs. Last time spent: 9 mins/30 secs. Words typed: 423, Messages sent: 102 (Avg. words/msg: 4). Cmds used: 3 (4 total uses), Fav. Cmd: claninfo (2 uses)


is that possible 3hrs afk out of 9mins>?
The-Black-Ninja
No, that's no possible, but it happens when the plugin first started up and the user was already in the channel at the time. Meaning that it wasn't able to record that user's afk time from 0 because they were already in the channel. You can counter-act this by simply going into the user_stats database and set their afk and total time spent to 0. I'll make a command for this next update.
Tanxs
QUOTE(The-Black-Ninja @ Feb 16 2009, 01:55 PM) *

No, that's no possible, but it happens when the plugin first started up and the user was already in the channel at the time. Meaning that it wasn't able to record that user's afk time from 0 because they were already in the channel. You can counter-act this by simply going into the user_stats database and set their afk and total time spent to 0. I'll make a command for this next update.


Lol.. I had already edited that myself Ninja. Same thing was happening to me, I had 8 users afk, they all read the same thing. Good stuff ;-)
The-Black-Ninja
Nevermind, I found why it's going negative; it's an issue with the GetGTC. GetGTC is the current system uptime in seconds, however, my system uptime is currently 25 days and the return for that is this:
CODE
[21:18:50.193] System uptime 25 days, 0 hours, 7 minutes and 30 seconds, connection uptime 0 days, 0 hours, 3 minutes and 11 seconds.

/exec addchat vbGreen, GetGTC

[21:18:51.021] -2134516562
Trying to figure out another way. I know I can always record the timestamp at login, but I liked the precision of GetGTC.
Tanxs
Oh thats no good!!! I haven't noticed, but is it change back edited corrections within the DB?
MusicDemon
Error:

QUOTE

[14:02:18] <MusicDemon.> -.-'
[14:02:18] UserTalk Call Error On File> C:\Program Files\StealthBot\MusicDemon[WCN]@Northrend\plugins\chanact.plug
[14:02:18] Error Number: -2147217900 Description: [Microsoft][ODBC Microsoft Access-stuurprogramma] Syntaxisfout in tekenreeks. in query-expressie `user` = 'MusicDemon.' AND `name` = '.-''.


Which means: Syntaxerror in .... in query expresion `user` = 'MusicDemon.' AND `name` = '.-''

EDIT:

QUOTE

[16:44:00] <Turpin> itt
[16:44:00] <MusicDemon[WCN]> Turpin is not on record yet.
[16:44:00] <Turpin[Obs]> Turpin has spent 0 Years, 0 Days, 1 Hours, 33 Minutes, and 37 Seconds in the channel.


Turpin[Obs] has NO trigger.
Turpin
i can confirm what music allready said above, i also found out, the script takes everything as a trigger

QUOTE
[17:03:29] <Turpin> whoami
[17:03:29] <Turpin[Obs]> You have 999 access.
[17:03:32] <Turpin> *whoami
[17:03:32] <MusicDemon[WCN]> You have 100 access.
[17:03:46] <Turpin> ?trigger
[17:03:46] <Turpin[Obs]> The bot's current trigger is " - " (Alt + 045)
[17:03:46] <MusicDemon[WCN]> The bot's current trigger is " * " (Alt + 042)
[17:03:46] <To Turpin> The current trigger is: "" (0 characters)
[17:03:54] <Turpin>
[17:04:01] <Turpin> activity
[17:04:01] <Turpin[Obs]> Turpin has joined 2 times, has been 16 mins/23 secs AFK out of a total 1 hrs/33 mins/37 secs. Last time spent: 17 mins/46 secs. Words typed: 3, Messages sent: 3 (Avg. words/msg: 1). Cmds used: 480 (1391 [more]
[17:04:01] <Turpin[Obs]> total uses), Fav. Cmd: (67 uses)
[17:04:23] <Turpin> gactivity
[17:04:23] <Turpin[Obs]> Turpin has joined 2 times, has been 16 mins/23 secs AFK out of a total 1 hrs/33 mins/37 secs. Last time spent: 17 mins/46 secs. Words typed: 3, Messages sent: 3 (Avg. words/msg: 1). Cmds used: 480 (1392 [more]
[17:04:23] <MusicDemon[WCN]> Not enough information on Turpin to perform analysis.
[17:04:24] <Turpin[Obs]> total uses), Fav. Cmd: (67 uses)
[17:04:35] <Turpin> OTT
[17:04:35] <Turpin[Obs]> Turpin has spent 0 Years, 0 Days, 1 Hours, 33 Minutes, and 37 Seconds in the channel.
[17:04:35] <MusicDemon[WCN]> Turpin is not on record yet.
[17:04:41] <Turpin> FLT
[17:04:41] <Turpin[Obs]> Turpin's last time spent in channel session was: 0 Years, 0 Days, 0 Hours, 17 Minutes, and 46 Seconds.
[17:04:41] <MusicDemon[WCN]> Turpin is not on record yet.
as you can see, my bot has no trigger and -, musics has * but they both react on everything, only one character long tho.
The-Black-Ninja
Already aware of this, but thanks anyway. I think what I'll have to do is just base their time spent and stuff with a timestamp and do a DateDiff on it. That should fix everything up, the trigger thing is easy enough to fix. I've got a test on Friday, so I may not get much done on this until the weekend.
MusicDemon
NP, thanks anyway, TBN.

GL with fixing.
The-Black-Ninja
You guys are lucky I like to help my requesters out tongue.gif I've transferred the GetGTC stuff to a Now() function. I'll try to find some time tonight to work on it more.
MusicDemon
<3 TBN
The-Black-Ninja
Okay guys, 2.4 now.
  • Issue with the " ' " if preceded by a trigger has been fixed.
  • Issue with the logging of commands has been fixed. Note that it will log anything starting with your trigger, even if it's not a valid command. I think that when I add the "total commands used" feature, if there's alot of data with more than 1 use, I can just omit the ones with 1 use or something.
  • Issue with the negative afk time has been fixed.

I've done some testing on my end and it seems to be working well, let's see how it goes during mass use.
Be-Eazie
Im getting this error again after update..

QUOTE
[6:42:38 PM] UserJoins Call Error On File> C:\Program Files\StealthBot\plugins\chanact.txt
[6:42:38 PM] Error Number: 450 Description: Wrong number of arguments or invalid property assignment
The-Black-Ninja
Oh my fucking god dry.gif Hang on...

Updated. I always do that, everytime I fix the plugin, I always say to myself "don't forget to remove the arguments...", then I update the changelog and forget to remove the arguments.
WhispersFOX
This is great!

But i was wondering. Say my clan gets flooded, It would be a mess to have all those names like ghfsfgs79s7 in the db! I was wondering if there is a way for the bot to not record it if the person only stays in the channel for say... less then 5 seconds. or something like that ^^
The-Black-Ninja
It can be done, would the majority of people like this as well or is this a PM only job?

OMG! JUST now I came up with how I'm going to work the next part of the plugin (don't you feel special you're witnessing this revelation?!). Instead of you having to judge for yourself whether or not they're AFK most of the time, I'm going to add a proportion factor in the Const settings. Example:
QUOTE
Proportion = 75%

User has been AFK for 4 min/ 4 seconds out of a total 11 mins (37% AFK - User is active)

But what if ...

User has been AFK for 10 min/ 4 seconds out of a total 11 mins (92% AFK - User is not active)...
I'll attempt to tie in the amount of messages sent and words typed to determine if they're chatty as well or not based on the same system.
WhispersFOX
Yeah, the proportion thing would be great!
Also, if it isnt too much a command that would tell you the users average time in the channel would be very helpful!
The-Black-Ninja
The average stay time would have to be added with a separate column. I'll have to add this on the next update. In the meantime, I've added a new command called "analysis", here's what it looks like:
QUOTE
/analysis the_black_ninja
[01:52:48.240] Activity analysis for the_black_ninja: xSeen [9] Msgs sent [5] Words/msg [1] AFK time [2 hrs/9 mins/34 secs] = 33% AFK, Commands used [4] Total time [8 hrs/28 mins/39 secs]

[01:52:48.271] 4% talkative overall during total time in channel, uses bot commands 20% less than talking (talks more), has joined 9 times and has spent 8 hrs/28 mins/39 secs total in the channel.
I was sure to remove the Beta arguments this time tongue.gif

If the constant updating becomes too much of an annoyance, I'll wait some more before releasing new versions. The reason why I'm updating frequently is because I don't know when I'll get some massive amounts of homework and end up having a dry spell from decent scripting.
MusicDemon
Hmm... it does record... but it doesn't display... Think it's me...
The-Black-Ninja
What do you mean "doesn't display"? What commands are you doing?
MusicDemon
Nvm... It works now... since the ... well I don't know why it works now...
WhispersFOX
Loving the analysis thing. But I found this...

[1:59:54 PM] Top 4: USER1(36 hrs/27 mins/13 secs), USER2(29 hrs/48 mins/23 secs), USER3(29 hrs/45 mins/58 secs), USER4(26 hrs/26 mins/1 secs)

Shouldn't it say

[1:59:54 PM] Top4: USER1(1 days/12 hrs/27 mins/13 secs), etc?
The-Black-Ninja
Yup, it should...

Updated, try it now. Those numbers should decrease greatly btw, the reason being was that I was multiplying by 60 to get from days to hours, when really, I should've been multiplying by 24.

I left the addchat's commented out, just in case you're wanting to see how the plugin is converting the seconds to hours, days, etc.
WhispersFOX
Disregard this post, i was typing while you were updating yours.

But anyway it works now thanks.

-------------------------------------------
Edit to the edit: The thing that shows the equation, say i do /ctrank 25, will that show it for *all* the 25 people? Its a bit spammy xD

Edit to the edit of the edit: Also, /analysis is not working...
Tanxs
QUOTE(The-Black-Ninja @ Feb 19 2009, 11:32 AM) *

Yup, it should...

Updated, try it now. Those numbers should decrease greatly btw, the reason being was that I was multiplying by 60 to get from days to hours, when really, I should've been multiplying by 24.

I left the addchat's commented out, just in case you're wanting to see how the plugin is converting the seconds to hours, days, etc.


Just wow Ninja. damn good work on this!! Can't wait for you to update the CRS plugin next. Its gonne be sweet!!!
MusicDemon
Hmm, AFK has became usles now... right?
The-Black-Ninja
@MusicDemon: What do you mean by AFK is useless?

@Tanxs: What updating is there to do?

@WhispersFOX: /analysis works alright for me, re-download and try it again.
Tanxs

@Tanxs: What updating is there to do?


AWWWW!!! You already forgot about me!!! sad.gif Poopy... Well I had asked you about updating/adding new stuff to CRS 3.7 - Auto-promote for points, and a couple other things, You said you were going to finish your update on PIMP list I think first. ... The title of the post is CRS 3.7 - http://www.stealthbot.net/board/index.php?showtopic=39552
The-Black-Ninja
Ohhh, that stuff, I thought you meant like, integrating this plugin with the CRS or something like that...
Tanxs
QUOTE(The-Black-Ninja @ Feb 19 2009, 02:13 PM) *

Ohhh, that stuff, I thought you meant like, integrating this plugin with the CRS or something like that...


Oh!! Sorry for confusing you Ninja, Didnt mean to. But ya, nothing like that. Any whom, Thank you again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.