Phrik

From ArchWiki
Revision as of 18:23, 20 October 2014 by Kyrias (talk | contribs) (Add expansion template.)
Jump to: navigation, search

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: This article is a WIP, might be moved to phrik when it's ready. Feel free to contribute. (Discuss in Talk:Phrik#)

Phrik is the friendly IRC bot in Arch Linux's IRC channels. He is a supybot with loads of handy factoids and utilities for things like searching Google, the ArchWiki, and the AUR, which is useful for quickly giving people links to what they need.

Account

Registering

To make new or change already existing factoids you need to have a phrik account, which doesn't have to be named the same as your IRC nick. To register with phrik all you need to do is to send him the following command (Remember to do it in private with /msg phrik <message> so that others won't see your password):

!register <name> <password>

Example: !register demize stuff to register an account named demize with the password stuff

Identifying

To identify with phrik for the current session, or until you !unidentify, you need to run the following command:

!identify <name> <password>

Example: !identify demize stuff

Identify with hostname

If you don't want to have to identify with phrik every time you connect you can add a hostmask to your phrik account which will make him identify you automatically everytime you connect from that host. They are in the form of nick!ident@host.

Be careful what hostmask you add tho, since anyone connecting with that hostmask will be identified as you so you don't want to add the host from your ISP since that will likely change a lot. To be autoidentified with a hostmask you'll want to either IRC from a server or have a cloak, otherwise the host will likely change a lot and thus others might get identified as you. If you are going to get identified with a host you might also want to run an ident server so that others connecting from the same server wont be able to fake being you.

Two good examples are demize!kyrias@theos.kyriasis.com or *!*@archlinux/op/demize.

Adding a new hostmask

To add a hostmask send the following command to phrik in private:

!hostmask add <hostmask>

Example: !hostmask add demize!kyrias@theos.kyriasis.com

Removing a hostmask

!hostmask remove <name> <hostmask>

Example: !hostmask remove demize demize!kyrias@theos.kyriasis.com

Listing hostmasks

!hostmask list

Factoids

Phrik has the MoobotFactoids plugins means that users can create, recall and give others factoids, which are small messages.

To make phrik recall a factoid you can either send the key of the factoid prefixed with an exclamation mark either to a channel where he is in or in private, like this:

!welcome

Finding out info about factoids

If you want to find out who and when a factoid was created you can use the factinfo command:

!factinfo welcome

Creating new factoids

Creating a new factoid is as easy as typing the key you want the factoid to be recalled by, is and then the message. Often you want to prepend the message with <reply> so that phrik will just write the message exactly as you give it, instead of printing <key> is <value>.

Making a factoid like this:

!example is "<reply>This is an example factoid"

Will make phrik send This is an example factoid to the channel or pm whenever someone says !example in the channel. If the <reply> is omitted phrik will instead say example is This is an example factoid.

Factoid locking

Factoid can be locked to prevent other people from removing or overwriting a factoid, but there's generally no need for that as it's just in the way if there ends up being a good reason for the factoid being changed. Normally locking and unlocking would be done by calling the commands from the MoobotFactoids plugin, but !fact is aliased to !MoobotFactoids for convenience.

If a factoid you think should be changed is locked, firstly contact the person who locked it (!factinfo will tell you), and if the person is either unavailable or refuses to change it but you still think it should be, due to breaking the rules or similar, feel free to contact the ops. (To get a list of ops send !listops to phrik in a pm.)

!fact lock <factoid key>

or

!fact unlock <factoid key>

Modifying factoids

For modifying a factoid there are two alternatives, the first is using a regex substitute and the second is replacing it completely. Regex replaces have the good property of keeping the original creator info and who last modified it.

Regex substitute

To replace the word "This" in the example factoid with the word "That" you can use regex replace like this:

!example =~ s/This/That/

Replacing a factoid

Completely replacing a factoid with something new can be done with the no command like this:

!no example is "a really bad example factoid"

Deleting factoids

Removing a factoid is done with !MoobotFactoids remove <factoid key>, but since that is to long there exists an alias for convenience called !rmfact. Don't delete others factoids without a good reason, and do ask first if you're unsure.

!rmfact <factoid key>