Feature - Implemented Putting Announcements on Kol Login page onto mafia login pane

So I know a lot of people that didn't know about the twitch event this Saturday because they never log into KoL normally anymore, so they never see the announcements. Perhaps putting the front page announcments into KolMafia's login pane might be a fun way to help mafia people keep in touch. If you're feeling ambitious you could even throw in the "collections" pane too.
 

xKiv

Active member
This is something I think I would also like, in some form. Maybe not outright in mafia's login window (because that appears before hitting the login page at all), but maybe printing new /updates and /trivials in CLI during login?
(if I wanted to see all of them, and not just the new ones (which would require tracking), I could just put /updates and /trivials in loginScript).
(of course, I also always use relay browser, so I see all updates and trivials in rightpane before opening chat ...)

Collections are kind of interesting too, but kind of not.
 

Darzil

Developer
On the twitch stream Jick sounded fairly amenable to adding a tag around any such announcements that we could possibly pick up and display on KoLmafia. That would be fairly elegant if possible. Without that I think it'd be a lot of work to support changing login page stuff.
 

lostcalpolydude

Developer
Staff member
I've been meaning to start up a thread in the KoL dev forum to get that rolling. I still think people will turn it off in mafia (not making it easy to do that seems like a good way to get lots of complaints) during the month of KoL Con announcements, but then it won't be mafia's fault that it isn't available.
 

lostcalpolydude

Developer
Staff member
I wrote some code that will show the stuff between "X players logged in." and the first update (detected by the <b> tag), as long as that block has an image tag. The window opens at a set size, unrelated to how much content there is to show...

There's an obvious checkbox above that to disable that window opening in the future. The checkbox isn't anywhere else in the GUI.

I just discovered that links turn the pointer into a hand, but nothing happens when you click them. Besides that, is there anything obvious that needs to be changed before adding this? I don't want to add something and have someone that would find it useful just disable it because it's poorly implemented to begin with.
 

Darzil

Developer
Sounds interesting, if that's the place they are going to use for future announcements. I'm not sure how clearly I can visualise it, I can look at a patch before commit if you like?
 

lostcalpolydude

Developer
Staff member
Attached a patch. Uncomment the line in LoginManager to see a window actually pop up right now (since there isn't an image tag on the login page so far).
 

Attachments

  • AnnouncementWindow.patch
    5.4 KB · Views: 34

Darzil

Developer
Looks good to me if an image is the way they plan to do things.

Edit - Might be tempted to wait until there is one, which I guess should be in the next week or so ?
 
Last edited:

ereinion

Member
Nice update!

One tiny improvement I'd suggest though, would be to make the preference to show/not show it global instead of per user. Hmm. I suppose some people might want it to show up on e.g. their main while not having it show up on multis, so maybe my suggestion is a bad one :p
 

lostcalpolydude

Developer
Staff member
Nice update!

One tiny improvement I'd suggest though, would be to make the preference to show/not show it global instead of per user. Hmm. I suppose some people might want it to show up on e.g. their main while not having it show up on multis, so maybe my suggestion is a bad one :p

That should already be the case.
 

Theraze

Active member
Personally, I'd rather see it once and not have to see the same message 3 times. But that might just be me. As such, I could try to do some sort of messy preference system, but... eh. Effort. I'll just re-read the same thing several times.

Something I've wondered though is whether there's any command to display the standard pre-login mafia messages regarding holidays, and now if there's any command to display these special login messages. If so, then users who only want this to display once could have that as a part of their character's breakfast script rather than having it on as a global preference.
 

lostcalpolydude

Developer
Staff member
I'm pretty sure I saw it on both logins I had today, but I could be mistaken of course :p It's not a huge deal anyway.

Oh, I thought you meant the setting to disable it showing up. If you logged in to the same character 10 times in a day, it would currently show up every time. I could see changing that.
 

ereinion

Member
No... What I meant that it might be a good idea to have the setting to show / not show it be shared among all characters logging on using the same "installation" of mafia. Today I have logged on with two different characters, I am *almost* sure that I unchecked the box for showing the event warning on my first logon, but upon logging on with the second character it showed up again. Whether this is a good or a bad thing... I am a bit more unsure of now than when I first posted. In any case it is not going to be a huge inconvenience for anyone to get their settings the way they want them.

But yeah, your idea is good too :)
 

lostcalpolydude

Developer
Staff member
No... What I meant that it might be a good idea to have the setting to show / not show it be shared among all characters logging on using the same "installation" of mafia. Today I have logged on with two different characters, I am *almost* sure that I unchecked the box for showing the event warning on my first logon, but upon logging on with the second character it showed up again. Whether this is a good or a bad thing... I am a bit more unsure of now than when I first posted. In any case it is not going to be a huge inconvenience for anyone to get their settings the way they want them.

But yeah, your idea is good too :)

I'm not seeing that behavior, so I don't think you actually unchecked the box.

14104 makes it so those only show up once per day. You can set _announcementShown to false if you want to see it again for testing, but for more practical purposes it's probably easier to just open the login page to look at it directly.
 

ereinion

Member
That is of course very possible, my memory isn't what it once was ;) Guess I should have double-checked before posting here :D
 

Veracity

Developer
Staff member
I've been wondering why I have yet to see this. I poked at the code and discovered that you look for the Announcement on the login page - which we never see if we use using the "secure" login method.

> get useSecureLogin

true
I've been running with that from when hola first implemented, in response to KoL dev warnings that KoL might be moving to require it. Using that scheme, we never see the login page, since we go over https and just have the password in the URL, rather than getting a "challenge" key back.

This also means that I never see the "xxx players online" message any more, either. I was sort of wondering when that went away.

I guess I should disable "secure login" until and unless KoL really does require it.
 
Top