:: toxcorp.com ::

Index of: /irc/irssi/friends/current/


drwxr-xr-x  4 shasta shasta     4096 2005-04-25 14:56 ../ 
-rw-r--r--  1 shasta shasta      175 2007-03-29 15:31 AUTHORS 
-rw-r--r--  1 shasta shasta      369 2003-10-14 18:27 BUGS 
-rw-r--r--  1 shasta shasta      617 2003-10-14 18:27 CREDITS 
-rw-r--r--  1 shasta shasta    15742 2003-11-09 22:13 Changes 
-rw-r--r--  1 shasta shasta      380 2003-10-14 18:27 TODO 
-rw-r--r--  1 shasta shasta    86828 2007-03-29 15:38 friends.pl 
-rw-r--r--  1 shasta shasta      189 2002-11-24 20:37 friends.pl.asc 


/irc/irssi/friends/current/README


=====================
 friends.pl's readme
=====================

=========
* About:
=========

 This is friends.pl, an userlist for Irssi. It can handle auto-opping;
auto-voicing; on-demand limit raising, key giving, opping, voicing,
inviting; and few other things. Entries can be password protected.
Script has some learning abilities. If you use all of these features,
you probably need an eggdrop bot ;-P

 It has been written for Irssi 0.8.5.CVS. You can get failures when
trying to run it with older Irssi.

 'What is Irssi?', you may ask. It's a nice irc client, written by Timo
Sirainen. More information about it is available at http://irssi.org/

=================
* How to run it?
=================

 I assume you are using a suitable Irssi's version, perl capable. Put
friends.pl into your ~/.irssi/scripts/ directory. Friendlist file is
~/.irssi/friends by default (you can change it to the path you want,
refer to the 'settings' part of this document).
 Now, type /script load friends.pl in your irssi. A message about loaded
script should appear. That's all :)


============
* Settings:
============

 /SET friends_file <path>
  - sets path to the friends file
    (default: ~/.irssi/friends)

 /SET friends_default_flags [flags]
  - sets default flags which are used in /addfriend (case sensitive!)
    (empty by default)

 /SET friends_show_flags_on_join <ON|OFF>
  - sets whether you want to see handle/flags when a friend joins to
    a channel or not
    (default: OFF)

 /SET friends_show_whois_extra <ON|OFF>
  - sets if to display handle/flags as additional info to /whois
    (default: ON)

 /SET friends_autosave <ON|OFF>
  - sets whether you want to automatically save your friendlist too,
    when your irssi's setup is saved; and load your friendlist every
    time your irssi's config is reloaded
    (default: OFF)

 /SET friends_backup_friendlist <ON|OFF>
  - sets whether to backup friendlist before saving or not
    (default: ON)

 /SET friends_backup_suffix [string]
  - sets backup suffix. this string will be appended to friends_file
    when creating backup filename. if empty - uses current unixtime.
    (default: .backup)

 /SET friends_use_ctcp <ON|OFF>
  - sets whether you want to process ctcp requests or not
    (default: ON)

 /SET friends_ctcp_commands <commands>
  - sets a space-separated list of ctcp commands, which should be
    processed
    (default: OP VOICE LIMIT KEY INVITE PASS)

 /SET friends_learn <ON|OFF>
  - sets whether you want to learn new users or not
    (default: OFF)

 /SET friends_voice_opped <ON|OFF>
  - sets whether you want to voice already opped users or not
    (default: OFF)

 /SET friends_max_queue_size <int>
  - limits the size of the operation queue. must be greater than 1.
    (default: 20)

 /SET friends_delay_min <int>
  - sets minimum delay value
    (default: 10)

 /SET friends_delay_max <int>
  - sets maximum delay value
    (default: 60)

 /SET friends_findfriends_to_windows <ON|OFF>
  - sets whether you want /FINDFRIENDS to list friends to specific
    windows or to the current one.
    (default: OFF [prints to current window])

 /SET friends_revenge <ON|OFF>
  - sets whether you want to use revenge on people who mess with your
    +p'ed friends
    (default: ON)

 /SET friends_revenge_mode <int>
  - how to revenge, acts just like an eggdrop bot:
     0 Deop the user.
     1 Deop the user and give them the +D flag for the channel.
     2 Deop the user, give them the +D flag for the channel, and kick them.
     3 Deop the user, give them the +D flag for the channel, kick, and ban them.
    Any other setting will stop revenging.
    (default: 0)


============
* Commands:
============

 /LOADFRIENDS [filename]
  - loads friends from file
    if filename is not given, uses friends_file setting.

 /SAVEFRIENDS [filename]
  - saves friends to file
    if filename is not given, uses friends_file setting.

 /ADDFRIEND <handle> <hostmask> [flags]
  - adds friend to your friendlist with given global flags.
    if 'flags' were not given, usess friends_default_flags.
    neither handle nor hostmask may contain percent sign (%)
    handle mustn't start with a digit.
    wildcards are allowed in hostmask.
 /ADDFRIEND <nick>
  - gets nick's userhost, and adds him to your friendlist.

 /DELFRIEND <who>
  - deletes user from your friendlist. who may be given in this form:
    1,2,fr,5-10 (this will remove friends 1, 2, 5 through 10, and user
    with handle ,,fr'')

 /ADDHOST <handle> <hostmask1> [hostmask2] [hostmask3] ...
  - adds hostmask to handle. hosts cannot overlap.
    hostmask cannot contain percent sign (%).

 /DELHOST <handle> <hostmask>
  - removes hostmask to handle.

 /DELCHANREC <handle> <#channel>
  - removes #channel record from handle (WITH FLAGS!).

 /CHHANDLE <oldhandle> <newhandle>
  - changes oldhandle to newhandle. newhandle must be unique,
    it must not start with a digit, and it cannot contain
    percent sign (%).

 /CHFLAGS <handle> <flags_spec> [#channel1] [#channel2] ...
  - alters flags for handle.
    flags_spec can be: +a, +ov, -k, -l+i, +a-o+v, or similar.
    if #channel is omitted, global flags are altered.
    channel's name cannot contain percent sign (%).

 /CHPASS <handle> [newpassword]
  - changes password for handle.
    if newpassword is not specified, deletes the current password.

 /CHDELAY <handle> <delay> <#channel>
  - changes handle's delay time on #channel to the given value.
    if delay is specified as 'none', 'random' or 'remove' -- random
    delay time will be used.
    channel's name cannot contain percent sign (%).
    HINT: use zero as delay time to get instant opping/voicing.

 /COMMENT <handle> [comment]
  - changes handle's comment line to the given string. If 'comment'
    is not given -- removes the current comment line from handle's
    data

 /LISTFRIENDS [#channel|number|handle|hostmask]
  - lists matching friends. lists all friends if invoked without
    arguments.

 /FINDFRIENDS [handle]
  - if handle is given, looks for this friend on every channels you're
    on. if handle is omitted, looks for all friends.

 /OPFRIENDS [#channel|*]
  - op all friends having +o on #channel. without #channel given,
    uses channel from current window. if given parameter is '*', ops
    all friends from all channels on current server

 /ISFRIEND <nick>
  - performs an USERHOST query on a given nick and matches
    the result against your friendlist.

 /QUEUE SHOW
  - prints all pending operations

 /QUEUE FLUSH <number|ALL>
  - flushes given operations from queue

 /QUEUE PURGE <number|ALL>
  - removes given operations from queue

 /OPPINGTREE
  - prints how many times our friend's friends were opped ;^)

 /FLUSHLEARNT
  - removes all chanrecs where 'L' flag is the only one. then 
    checks if this friend has any other chanrecs, password set,
    global flags. if not - deletes the friend.
    clears the opping tree.

 /FRIENDSVERSION
  - prints info about current script's and friendlist's versions.


=========
* Flags:
=========

 a == Auto.
      if used in conjunction with o/v -- allows opping/voicing on join
 o == Op.
      allows person to get op.
      (via ctcp - instantly; on join - depending on delay value)
 v == Voice.
      allows person to get voice.
      (via ctcp - instantly; on join - depending on delay value)
 d == Don't op.
      this flag forbids auto-opping, except when user has channel +o flag
 D == Deop.
      automatically deop if opped with someone without +m
 m == Master.
      allows opping/deopping anyone without consequences :)
 p == protect
      makes use of revenge/revenge_mode. friend with this flag will be
      'protected', offending person will be deopped/kicked/banned, depending
      on friends_revenge_mode setting. doesn't affect +m'ed offenders.
 r == Reop.
      reops friend if he gets deopped (except if having channel +d flag,
      or got deopped by a friend with +m)
 i == Invite.
      allows person to ask for invite (via ctcp).
 u == Unban.
      allows person to ask for unban (via ctcp)
 l == Limit-raise.
      allows person to ask for limit-raising (via ctcp).
 k == Key.
      allows person to ask for key on a key-protected channels (via ctcp).
 F == learnFrom.
      allows script to learn new friends from this person's op-decisions.
 L == Learnt.
      indicates that person was learnt from some +F'ed user's oppings.


========
* CTCPs
========

Brief list of available CTCP requests (nick is the nickname of the person
running this script. yours, for example ;-)):

/CTCP nick OP #channel [password]
 - requests for an OP on #channel.
   requires either global or #channel's 'o' flag.
   if user has a password set, he has to supply it.
   doesn't op already opped people.

/CTCP nick VOICE #channel [password]
 - requests for a VOICE on #channel.
   requires either global or #channel's 'v' flag.
   if user has a password set, he has to supply it.
   doesn't voice already voiced people.

/CTCP nick INVITE #channel [password]
 - requests for an invitation to #channel
   requires either global or #channel's 'i' flag.
   if user has a password set, he has to supply it.
   doesn't send invite if user is on the #channel at the moment

/CTCP nick UNBAN #channel [password]
 - requests for removing all #channel bans corresponding
   to current user's hostmask.
   requires either global or #channel's 'u' flag.
   if user has a password set, he has to supply it.

/CTCP nick LIMIT #channel [password]
 - requests for a limit raising on #channel.
   requires either global or #channel's 'l' flag.
   if user has a password set, he has to supply it.

/CTCP nick KEY #channel [password]
 - requests for a #channel's KEY
   requires either global or #channel's 'k' flag.
   if user has a password set, he has to supply it.
   doesn't send key if user is on the #channel at the moment

/CTCP nick PASS pass1 [pass2]
 - if 'pass2' is omitted, sets user's password to 'pass1'
   if both arguments are given, changes user's password from
   pass1 to pass2 (if pass1 is a current, valid user's password)

/CTCP nick IDENT handle password
 - identifies as user 'handle' (adds host). 'handle' MUST have
   password set or ident won't work.


========================
* AutoOpping-Mini-HOWTO
========================

For random-delayed auto-op use:
 /addfriend myfriend *!user@host.domain
 /chflags myfriend +ao #mychan
 /chdelay myfriend remove #mychan   <-- not needed really :)

For auto-op after 15 seconds, use:
 /addfriend myfriend *!user@host.domain
 /chflags myfriend +ao #mychan
 /chdelay myfriend 15 #mychan

For instant auto-op use something like:
 /addfriend myfriend *!user@host.domain
 /chflags myfriend +ao #mychan
 /chdelay myfriend 0 #mychan       <-- _NEEDED_ :-)


====================
* URL, contact info
====================

 You should be able to get the newest script && docs from:
  http://toxcorp.com/irc/irssi/friends/

 Any bugreports/complaints/requests/flames/improvements/hotchicks can be
sent to me.

 I hope you'll find it useful. Have fun :)


$Id: README,v 1.2 2003/09/25 17:18:03 shasta Exp $