ii

irc it, simple FIFO based irc client
git clone git://git.suckless.org/ii
Log | Files | Refs | README | LICENSE

FAQ (1807B)


      1 FAQ
      2 ===
      3 
      4 Where is IRC command xy (ignore etc.)?
      5 --------------------------------------
      6 ii is for advanced users, please use standard tools like awk, sed and grep for
      7 this. This can be done easily and will not bloat the code.
      8 
      9 
     10 Where is a graphical interface?
     11 -------------------------------
     12 Basically ii follows the UNIX philosophy so it is only file based. But it
     13 should be easy to build different interface because they only have to handle
     14 the FIFOs and output files. Feel free to implement or wait until we have done
     15 this. Actually I use ii in combination with vim, multitail and screen and it works
     16 like a charm.
     17 
     18 
     19 Which commands are supported?
     20 -----------------------------
     21 j (join or msg), t (topic), a (away), n (nick), l (leave). The missing are
     22 obsolete or can be easily used by typing the IRC commands itself (i.e. /WHO
     23 instead of /who).
     24 
     25 
     26 How can I recognize queries?
     27 ----------------------------
     28 ii itself doesn't support this but the queries.sh script is an example
     29 of how to get the new and changed files in your irc directory.
     30 To get an instant notice of a new file other mechanisms like inotify/dnotify
     31 could be used as well but I was too lazy to try it out since the script
     32 is enough for me.
     33 
     34 
     35 What other fancy stuff can I do with ii?
     36 ----------------------------------------
     37 It is very easy to write irc bots in ii:
     38 
     39 	#!/bin/sh
     40 	chan="#yourchannel"
     41 	tail -f "${chan}/out" | while read -r line; do
     42 		cmd=$(printf '%s\n' "$line" | cut -d ' ' -f 4-)
     43 		name=$(printf '%s\n' "$line" | cut -d ' ' -f 3 | tr -d '<>')
     44 		if [ "$cmd" = "!rand" ]; then
     45 			r="$RANDOM"
     46 			if expr "$r" "%" "10"; then
     47 				echo "$name: $r" >> "${chan}/in"
     48 			fi
     49 		fi
     50 	done
     51 
     52 This will just spam a channel but think about using nagios2irc or you can
     53 use ii to generate channel stats. Your imagination should be boundless.