accessing KMail from ASH

wonko

New member
I'd like to have a script that checks for certain messages and acts on them. Is this possible?

Thanks!

-brian
 

macman104

Member
There may be a way to manipulate it with the ASH functions visit_url and contains_text but I'm doubtful. I think if there were a way to interact in such a manner, holatuwol might nerf that functionality to avoid spam.
 

wonko

New member
I certainly wouldn't want to make it easy to send kspam, i get enough of that in my regular email. :)

i don't need to be able to send kmail, just read and delete kmail.

I think i'll take a stab at visit_url and see what i can contruct. ;)

Thanks!

-brian
 

Nightmist

Member
Heh quite possible depending on how the HTML for a message looks, if the senders player ID can be separated out from the HTML then it should be pretty easy to do really.

Yeah, it's ?possible? that visit_url and direct urls might start being "filtered" like disable the whole "mail.php" (Or whatever the name of the page is), since playerID is used for stuff instead of player name, it means a simple increasing int on a loop = massed spam to everyone in the kingdom... assuming you leave mafia on long enough to "attempt to" send 1mil+ messages... sever death...

Well at least I know its possible to do a increasing int in a loop, I did a test using string editing, visit url, contains text and map to file but for the "Player Profiles", (It records "Name"//"Level"//"Familiar"//"Clan" within a map and then puts the map into a file.), but anyway the point is, its quite "server spam-able" but the general point of it is that, jackassery possible? Yes, jackassery wanted? No.

Personally this in my opinion is a "touchy" topic//project and so I would like to wait until Hola makes a comment about it, but if Hola gives the okay then I wouldn't mind working on it with you. (Or make my own... hehe competition!)
 

wonko

New member
Well, of course I wouldn't want to see it made easy to spam people, that's not something I want to have any part of.

Make the mail system read-only (and managable, delete, move, etc) would not add the ability to create spam, as you wouldn't actually be able to send mail.

If it comes down to it, I can always write something extern that snags mail with wget or something and then processes the file and creates an easy to read file for mafia. :)

-brian
 

Nightmist

Member
[quote author=wonko link=topic=445.msg2336#msg2336 date=1159798879]
If it comes down to it, I can always write something extern that snags mail with wget or something and then processes the file and creates an easy to read file for mafia. :)
[/quote]
All I got to say is that after doing some personal work on this I can safely say that you do NOT need a external parser, visit_url and the other substring editing functions work wonders. Although it only parses for items//meat//playerID, it wouldn't be too hard to also grab the text from the K-Mail.
These are your friends:
Code:
visit_url( string)
contains_text( string, string)
index_of( string, string, int)
substring(string, int, int)
The only problem with this is if someone starts deliberately sending you messages that have written HTML which the substring functions could possibly choke on.
 

wonko

New member
Ok, well then I won't waste my time with an external process. Like most bots, this wouldn't care about the text, so i could probably get around evilness in the text portion.

Thanks!!!

-brian
 
Top