User:GeorgeMoneyBot-status

{{botlinks|{{PAGENAME}}}}

{{bot|GeorgeMoney|status=unapproved}}

{{Emergency-bot-shutoff}}

{{-}}

Function

This bot updates status changers. Simple as that.

Info

For more info, see the BRFA: Wikipedia:Bots/Requests for approval/GeorgeMoneyBot-status

It is written in PHP using GM Wikipedia Bot framework.

  • It changes the status of a user, who has a status-changer, based on what they do on irc.
  • For example:
  • If I am GeorgeMoney and I change nicks to GeorgeMoney|Away, it sets User:GeorgeMoney/status to 'away'.
  • If I am GeorgeMoney|Away and change my nick to link (a nick that is not set within the bot), it will set me to 'here'
  • If I am GeorgeMoney and change nick to GeorgeMoney|here nothing happens and an edit is not made (because the status is the same). This prevents from making null edits.
  • If I am GeorgeMoney and I join #GeorgeMoney-status, it sets me to 'here'.
  • If I am GeorgeMoney|Away and I join, it sets me to 'away'
  • If I am anything at all and i QUIT or PART the channel, it sets me to 'out'
  • If I am GeorgeMoney but have not spoken for 30 minutes, it sets me to 'idle'
  • Note that all of these statuses and nicks are set in the config for each user.
  • If someone types !status foo it sets their status to 'foo'. If someone types !status %var(foo), it sets their status to whatever they have set for the nick 'foo'.

How to register

  • Create a subpage of yours called User:YOURNAME/StatusConfig
  • The contents should be something similar to (I know it looks long and confusing, but if you actually look it through, it is really simple):

{{User:GeorgeMoneyBot-status/Register}}

  1. dont forget that you must be in #GeorgeMoney-status for anything to work
  2. remember to replace all instances of GeorgeMoney with your nick
  3. nicks

GeorgeMoney=here

GeorgeMoney_=%var(GeorgeMoney)

GeorgeMoney|away=away

georgemoney|busy=I am busy right now.

  1. for a more details on the format for %time, see http://php.net/date

georgemoney|readyForChat=I am online with the nick %nick. I have been online since %time(F d, Y; h:i a)

  1. if the nick to which you change is not set in the config:
  2. for example a nick like "GeorgeMoney|randomLinkedNickIJustMade"
  • =%var(GeorgeMoney)
  1. if you leave the channel or quit irc

exit=out

  1. if you join on a nick that is not set above.

join=I am here

  1. what to set if you've gone idle?
  2. all times are UTC

idle=I have been idle since %time(F d, Y; h:i a)

  1. what is the threshold till you become idle?
  2. it can be a value like 10m for 10 minutes, or 10h for 10 hours, or 10d for 10 days
  3. if you don't want idle detection enabled, make the value just plain '0'

idle_time = 30m

  1. nicks that are allowed to be set idle
  2. this is because you dont want foo|away to be set idle

idle_allowed=georgemoney georgemoney_ georgemoney|readyForChat

  1. your irc hostname
  2. make sure you spell it correctly.

host=wikipedia/georgemoney

  1. page to update status
  2. must be in your userspace

page=User:GeorgeMoney/status

</nowiki></pre>

  • You can type !status foo in #GeorgeMoney-status to override any of this.
  • You can use any mix of wikicode, parser functions, html, and bot variables (%time(), %var(), and %nick) inside the statuses. %time(timeformat) is a time format based on http://php.net/date. %var(variablename) where variablename is anything before the equals sign specified in the config. %nick is the current nick.
  • The page to update status (variable name is 'page') should be a blank page where the status will go. A suggestion is to have the page to update status (variable name is 'page') included by a switch statement. The switch will determine your status from there. If you have no idea what any of that means, copy User:GeorgeMoney/status, User:GeorgeMoney/status/template, and User:GeorgeMoney/status/div to your userspace. Then just replace all instances of 'GeorgeMoney' with your username inside the wikicode of each of those pages.
  • When you're ready to go, just join [irc://irc.freenode.net/GeorgeMoney-status #GeorgeMoney-status] on freenode.

BRFA status

Approved.