BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Generic custom modules => Topic started by: Breenild on January 29, 2010, 11:11:07 am
-
This very small Module shows the date, when a Player on any of his alts was online.
The command is !laston
Note: this Module creates 2 new Views "player_last_seen" and "alts_alle" in your Database!
-
I updated the View, which is created by this Module.
Please simply reinstall the Modul and simply restart the Bot to update.
-
It looks like there is a problem creating the table. I received the following error when I tried this module:
MySQL ERROR(# 1) on query: CREATE or REPLACE VIEW alts_alle
AS
select `a`.`alt` AS `alt`,`a`.`main` AS `main`
from `alts` `a`
union
select distinct `a`.`main` AS `alt`,`a`.`main` AS `main`
from `alts` `a`
union
select u.nickname as main, u.nickname as alt
from laradil_users u
where not exists (
select * from alts a
where a.alt = u.nickname or
a.main = u.nickname)
order by
main, alt
Table 'bebotdb1.laradil_users' doesn't existMySQL ERROR(# 2) on query: CREATE or
replace VIEW player_last_seen
AS
SELECT a.main AS main, max(u.last_seen) AS last_seen, max(w.level) AS max_level
FROM alts_alle a
join whois w
on a.alt = w.nickname
join propbot_users u
on a.alt = u.nickname
group by a.main
union
select u.nickname AS main, u.last_seen AS last_seen, w.level AS max_level
from propbot_users u
join whois w
on u.nickname = w.nickname
where not exists (
select 1 from alts_alle a
where a.alt = u.nickname
)
order by
last_seen desc
Table 'bebotdb1.alts_alle' doesn't existPropbot [MOD-CUSTOM] [LOAD] LastOn.p
hp
-
Thanks for this error-report!
My Mistake was, that I coded my Botname as a Textconstant.
This is now fixed.
Please download (http://bebot.link/generic-custom-modules/player-last-online/?action=dlattach;attach=894) again and rerun.
-
mmm, any reason the output comes in german and lists 8 pages of hits for all logins of any user?
-
OK, here is a new Version (http://bebot.link/generic-custom-modules/player-last-online/?action=dlattach;attach=895)of "laston".
I build in a little language localisation. The default Language is english now.
If you want to set up german you only have to change the line
var $lang = "en";
to
var $lang = "de";
Note:
You need to add all alt-chars of one player to his mainchar by using the !alt add <nickname> command.
Alternativly a bot-admin can use !altadmin add <mainchar> <alt>
=>This script scans all alt-chars of a player an displays the login date of this alt, which was recently used.
p.s. sorry for my english :)