Development > Generic custom modules
Player last online
Breenild:
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!
Breenild:
I updated the View, which is created by this Module.
Please simply reinstall the Modul and simply restart the Bot to update.
RaZeR:
It looks like there is a problem creating the table. I received the following error when I tried this module:
--- Code: ---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
--- End code ---
Breenild:
Thanks for this error-report!
My Mistake was, that I coded my Botname as a Textconstant.
This is now fixed.
Please download again and rerun.
plugz:
mmm, any reason the output comes in german and lists 8 pages of hits for all logins of any user?
Navigation
[0] Message Index
[#] Next page
Go to full version