Buff Bot Online Status Parsing

Sputnik1

Member
I'm am currently trying to easily solve the problem of determining the online status of a player, mainly a bot.

One of my codes is as follows,

Code:
if (contains_text(visit_url("showclan.php?whichclan=6741&pwd"),"+KolaBuff"))
   { print("Kolabuff is Online!!!");}
  else
   { print("Kolabuff is MIA");}

The problem I am running into is that the output from the link doesn't contain either "+ Kolabuff" or "+Kolabuff".
What I can tell is that the + doesn't either show up or is in a nontext format like in HTML since just "Kolabuff" works by itself. If anyone can figure out how to include the "+" that would be great.


The other option to possibly solve this would be to use the chat command /whois and use the GCLI output to check if they are currently online.
The problem with this one is that I can't find a way to use chat commands in ash code like in conjunction with chat_clan().
 
Last edited:

Bale

Minion
Code:
[COLOR="#808000"]> ash is_online( "KolaBuff" );[/COLOR]

Returned: true

[COLOR="Olive"]> ash is_online( "zonkttc" );[/COLOR]

Returned: false

02/19/10 02:48 AM - KolaBuff (#1061817) (#1061817), the Level 119 Sauceror
This player is currently online in channel clan and listening to hobopolis and slimetube.
02/19/10 02:48 AM - zonkttc (#333480) (#333480), the Level 55 Accordion Thief
Looks like you've got an easier solution than you suspected.
 
Last edited:

Bale

Minion
9 months ago.

Code:
Revision: 7305
Author: veracity0
Date: 11:29:04 PM, Sunday, May 24, 2009
Message:
Add boolean is_online( string ) function to ASH.
Item drop data for Rushing Bum
dwarf bread now has an autosell price
----
Modified : /src/data/monsters.txt
Modified : /src/data/tradeitems.txt
Modified : /src/net/sourceforge/kolmafia/KoLmafia.java
Modified : /src/net/sourceforge/kolmafia/KoLmafiaCLI.java
Modified : /src/net/sourceforge/kolmafia/swingui/BuffRequestFrame.java
Modified : /src/net/sourceforge/kolmafia/swingui/panel/PulverizePanel.java
Modified : /src/net/sourceforge/kolmafia/textui/RuntimeLibrary.java
 
Top