1
0
Fork 0

Initial revision

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 1999-09-03 14:27:29 +00:00 committed by cras
parent 2d97cd3cc4
commit 770ae4596d
29 changed files with 4987 additions and 0 deletions

31
.cvsignore Normal file
View File

@ -0,0 +1,31 @@
Makefile
Makefile.in
aclocal.m4
config.cache
config.guess
config.h
config.log
config.status
config.sub
configure
configure.scan
libtool
ltconfig
ltmain.sh
stamp-h
stamp-h.in
stamp.h
version.h
config.h.in
.exrc
gnome-bug
gnome-config
install-sh
missing
mkinstalldirs
INSTALL
intl
ABOUT-NLS
COPYING
irssi.spec
default-config.h

1
AUTHORS Normal file
View File

@ -0,0 +1 @@
Timo Sirainen, cras@irccrew.org

383
COMMANDS Normal file
View File

@ -0,0 +1,383 @@
** Some definations
"Level" usually means that you can use these words there:
CRAP - Can be almost anything
PUB - Public messages in channel
MSGS - Private messages
CHAN - Channel messages: joins, parts, quits, etc.
NOTICES - Notices
SNOTES - Notices from server
WALLOPS - Wallops
ACTIONS - Actions (/me)
DCC - DCC messages
CTCP - CTCP messages
HILIGHT - Hilighted text
CLIENTNOTICES - Irssi's notices
CLIENTERRORS - Irssi's error messages
** Server handling
CONNECT <address>[:port[:password]]
Connect to specified server
DISCONNECT <* / tag> [message]
Disconnect from server
SERVER <address>[:port[:password]]
Disconnect from current server and connect to new one
SERVERS
Display a list of servers
RMRECONNS
Remove all servers from reconnection list
** Basic IRC commands
QUIT [message]
Quit irssi
JOIN <channel> [key] [, channel...]
Join to channel(s)
PART [channel] [message]
Leave from channel
QUERY <nick>
Create query window
UNQUERY <nick>
Close query window
MSG <nick/channel> <message>
Send message to nick/channel
ME <message>
Send action to channel (/me thinks..)
NOTICE <nick/channel> <message>
Send notice to nick/channel
WHOIS [server/nick] <nick>
Send WHOIS query, you can also specify from what server to ask the
information. If you type the nick twice it will ask from the same
server what nick is using.
AWAY [message]
Sets yourself away/unaway
AWAYALL [message]
Sets yourself away/unaway to all connected servers
WHO <nick/channel>
Show WHO list
NAMES [channel]
List nicks (in channel)
** Bit more advanced commands
MODE <channel/nick> <mode>
Get/set channel/nick mode.
Get channel modes:
b - Get ban list
e - Get ban exception list
I - Get invite list
Set channel modes (use +/- before these):
b *!ban@mask - Set/remove ban
e *!ban@mask - Set/remove ban exception
I *!ban@mask - Set/remove channel invite
o nick - Set/remove op status
v nick - Set/remove voice status
l limit - Set remove max. people limit in channel
k key - Set/remove channel key
s - Secret
p - Private
m - Moderated
i - Invite only
n - No external messages
t - Only ops can change topic
User modes:
i - Invisible
w - Show wallops
s - Show server notices
TOPIC [channel] [topic]
Get/set channel topic
INVITE <nick> [channel]
Invite nick to channel
CTCP <nick/channel> <command>
Send CTCP request to nick/channel (PING, VERSION, ..)
NCTCP <nick/channel> <reply>
Send CTCP reply to nick/channel
PING <nick>
Send CTCP PING to nick and tell how long it took to receive the reply
ISON [nick [nick...]]
Ask if nicks are in IRC.
WALL [channel] <message>
Send notice message to all operators in channel.
OP, DEOP, VOICE, DEVOICE [channel] [nick [nick...]
Op/deop/voice/devoice nick(s) in channel
KICK [channel] <nick> <reason>
Kick nick from channel
KICKBAN [channel] <nick> <reason>
Kick+ban nick from channel
KNOCKOUT [secs] <nick> <reason>
Kick+ban+delay (default to 5min)+unban
BAN [channel] [nick [nick...]]
Ban nick(s) in channel
UNBAN [channel] [mask [mask...]]
Remove ban(s) from channel
BANSTAT [channel]
List bans and ban exceptions in channel
BANTYPE <normal/host/domain/custom>
Set ban type:
Normal - *!user@*.domain.net
Host - *!*@host.domain.net
Domain - *!*@*.domain.net
Custom [nick] [user] [host] [domain]
eg. /bantype custom nick domain - nick!*@*.domain.net
eg. /bantype custom user host - *!user@host.domain.net
INVITELIST [channel]
List invites (+I) in channel
VERSION [server]
Displays irssi version and asks IRC server's version
VER [nick/channel]
Sends CTCP VERSION request to nick/channel
SV [nick/channel]
Sends irssi version text to nick/channel
KILL <nick> <message>
Kill nick from irc network. [irc ops only]
WALLOPS <message>
Write wallops message. [irc ops only]
QUOTE <message>
Send raw data to irc server - DON'T USE THIS unless you really know
what you're doing!
** DCC handling
DCC
List DCC connections (same as DCC LIST)
DCC CHAT <nick>
Open DCC chat
DCC SEND <nick> <filename>
Send file to nick
DCC GET <nick> [filename]
Get file offered by nick
DCC RESUME <nick> [filename]
(MIRC) Resume getting file offered by nick
DCC CLOSE <type> <nick> [filename]
Close DCC connection
DCC LIST
List DCC connections
MIRCDCC [n]
Set MIRC style CTCPs on/off
** User interface handling
WINDOW <NEW/CLOSE/SERVER/PREV/NEXT/GOTO/LEVEL>
NEW [HIDDEN/TAB]
Create new window (in tab)
CLOSE
Close the current window
SERVER <tag>
Change which server to use in current window
PREV/NEXT/GOTO <N>
Go to previous/next/Nth window
LEVEL <[+/-]pub/msgs/...>
Change window level, eg.
/window level msgs - creates messages window
/window level all -msgs - creates status window
CLEAR
Clear screen
ECHO <text>
Print text to screen
MODES
Open channel modes dialog (GTK/GNOME version)
GWHOIS <nick>
Display WHOIS information in dialog (GTK/GNOME version)
LAST [-pub -msgs...] <text>
Display (only public/msgs/..) lines where <text> appears
(Text version only)
** Configuration
SET [key [=value / [key [key..]]
Get/set configuration
ALIAS, UNALIAS <alias> [command]
Set/remove alias, /unalias is the same as /alias without command
These codes are extracted in commands:
%0 : name of alias
%1, %2, %3 .. : %th word
&1, &2, &3 .. : &th word + the rest of the text after it
%c : channel name
Typing extra / before /command (//command) ignores any aliases
IGNORE, UNIGNORE <mask> [level [level..]]
Ignore/unignore specified level(s) or everything from nick
NOTIFY <mask> [ircnet [ircnet..]]
Add mask (nick) to notify list for specified ircnets..
UNNOTIFY <mask>
Remove mask from notify list.
LOG <CREATE/CLOSE/START/STOP/LIST>
CREATE <filename> [<+/->level ...] [#channel/nick [
[<+/->level ...] ...]
Create and start logging to file
Example: /log create mylog -all +msgs #linux +chan +public
(or simply #linux +all logs everything that appears in #linux
window).
CLOSE <filename>
Close log and remove from configuration
START <filename>
Start logging to file
STOP <filename>
Stop logging to file
LIST
List logs.
LOAD <plugin> [arguments]
Load plugin
UNLOAD <plugin>
Unload plugin

46
Makefile.am Normal file
View File

@ -0,0 +1,46 @@
# create default-config.h
config.h: default-config.h
default-config.h: config
./file2header.sh config > default-config.h
## if <internationalization support>
#SUBDIRS = po intl macros support # <your subdirs here>
## else
if BUILD_PLUGINS
PLUGINS=plugins
endif
if BUILD_SERVERTEST
SERVERTEST=servertest
endif
SUBDIRS = macros src $(PLUGINS) $(SERVERTEST)
## endif
## to automatically rebuild aclocal.m4 if any of the macros in
## `macros/' change
@MAINT@include macros/macros.dep
@MAINT@macros/macros.dep: macros/Makefile.am
@MAINT@ cd macros && $(MAKE) macros.dep
if HAVE_GNOME
appletdir = $(datadir)/applets/Network
applet_DATA = irssi.desktop
corbadir = $(sysconfdir)/CORBA/servers
corba_DATA = irssi.gnorba
endif
confdir = $(sysconfdir)/irssi
conf_DATA = config colorless.theme
EXTRA_DIST = window-views-patch.diff \
autogen.sh \
README-HEBREW \
COMMANDS \
file2header.sh \
irssi.spec.in \
irssi.spec \
$(conf_DATA) \
irssi.gnorba \
irssi.desktop

0
NEWS Normal file
View File

82
README Normal file
View File

@ -0,0 +1,82 @@
irssi
* ABOUT
Irssi is an IRC client made with GTK+ toolkit and (optional) GNOME libraries.
A small text mode version is also somewhat working, there's also a really
simple daemon version which just loads "bot" plugin (which doesn't exist).
I'd also like to see KDE version but someone else will have to do it.
* FEATURES
See COMMANDS file for list of all commands irssi knows.
I've been asked quite a lot about why should one use irssi, what does it do
that other IRC clients don't? Well, to tell you the truth, I have no idea :)
Still I've got a lot of mails saying it's the best GUI IRC client they've
ever used :) Let's see.. It should be easy to use, it has most of the
features IRC client needs and it's pretty stable. Here's a small list of what
it does:
- Nice configuration :) Especially the color settings.
- You can connect to multiple servers. Irssi is also IRC network aware so
you can specify some settings to work only in specified IRC networks.
- Automatically connect to IRC server(s) at startup, automatically join to
channels when connected
- All code is nonblocking, it won't hang while connecting to server or
opening DCC connection. Host lookups are done in separate processes.
- DCC send, receive and chat with GUI
- GNOME panel support, channels and queries are displayed in GNOME panel
where you can easily see which channels have been updated (label turns to
red) and click in them to open the channel.
- Doubleclicking URL in text widget launches specified web/ftp/email client,
also doubleclicking channel/nick join to channel or creates query.
- Aliases, ignores, autoignoring when flooding, notify lists, completing
specified words with tab (like home&lt;tab&gt; -> http://my.home.page),
hilighting lines with specified texts
- Smart nick completion
- Configurable logging support
- You can use ZVT widget to print texts, it's really fast so you can be
joined to many high traffic channels and irssi won't slow up
- Plugins support, creating plugins is really easy.
- Lots of nice GUI stuff :)
* INSTALLATION
./configure
make
make install
Configure can use these parameters (all of these defaults to yes):
--with-proplist=dir Specify libPropList directory
--with-servertest Build test irc server which you can use to try crash
irc clients
--without-gnome Build without GNOME libraries
--without-gnome-panel Build without GNOME panel
--without-imlib Build without Imlib library
--without-socks Build without socks library
--without-textui Build without text mode version
--enable-memdebug Enable memory debugging, great for finding memory
leaks
--enable-gtk-hebrew Enable Hebrew support - see README-HEBREW
There's also some others, you can get a full list with ./configure --help
If you don't want to run irssi in panel, add --no-applet to command line
parameters.
* BUGS / SUGGESTIONS
See TODO file if it is already listed in there - if not send me email..
* AUTHOR
Timo Sirainen, cras@irccrew.org, cras/ircnet/#irssi, http://xlife.dhs.org/irssi/

43
README-HEBREW Normal file
View File

@ -0,0 +1,43 @@
Hebrew support in irssi
-----------------------
Before you can enjoy IRCing in Hebrew, you need to get two other things.
1. FriBidi, a free implementation of the Unicode BiDi algorithm).
See http://imagic.weizmann.ac.il/~dov/freesw/FriBidi/
2. hebxfonts, a collection of Unicode-encoded Hebrew fonts along
with the keyboard mappings to use them (the right Alt key will be
configured to generate Hebrew characters).
See http://metalab.unc.edu/pub/Linux/X11/fonts/
After you get these two, you should be ok to go. To enable the Hebrew
support, specify --enable-gtk-hebrew=<path>. If the path starts with a
tilde (~), it is taken relative to your home directory. Here's a good
idea:
configure --enable-gtk-hebrew=~/.gnome/irssi-hebrew.gtkrc
After compiling and installing, you should copy the supplied gtkrc
file to where you told the program it would find it. Say you're at the
root of the irssi source tree, typing:
cp src/gui-gnome/irssi-hebrew.gtkrc ~/.gnome/irssi-hebrew.gtkrc
would do the trick.
One last configuration task is done from within irssi. Fire it up,
then go to the preferences dialog box and select a Hebrew font.
(e.g., -misc-fixed-medium-r-normal-*-*-120-*-*-c-*-iso8859-8)
The Hebrew support is not complete; it works as expected (ie, reversing
stuff with the FriBidi thingy) for the text entry field and for the
output text. In other places, you may see Hebrew characters, only
going left-to-right; in yet other places, you may not see Hebrew at all.
I have no intention of making this any better; comprehensive support
for Hebrew should come from within the GTK+ widget set, and not by
patching applications.
Ronen Tzur <rtzur@shani.net>

140
TODO Normal file
View File

@ -0,0 +1,140 @@
- window goto active, name
*** Bugs
- If there's any empty lists in configuration file (like ircnets = ();),
libPropList crashes irssi at startup.. Irssi doesn't save any empty lists
now, but still this needs to be fixed in libPropList..
- after changing irssi-text's screen size to smaller it leaves some empty
lines to windows before printing text, redrawing screen moves the lines
back up.. hm..
- irssi can't find new themes in ~/.irssi/ while running - scan for new
themes when opening themes dialog? irssi-text also needs to be restarted
to use new themes..
- mirc ctcp togglemenuitem isn't updated right
- multiple dcc connections from different irc networks from same nick
doesn't work. Maybe create "server nick" and "refer nick" variables to
DCC_REC?
- gfloat doesn't work in formats .. why? In DCC messages kb and kb/s values
could be shown as floats..
*** text GUI
- statusbar:
- when starting to run out of space some items could be made smaller,
activity for example .. make some generic flag for items to use.
- activity: hilight number if window has message for you or hilighted
text
- "you have new mail"
- active server tag somewhere in window
- word wrapping doesn't work perfectly, if colors/bolds/etc are used, they're
treated as spaces. So things like (<newline>blah blah) can happen (/who)
- autojoining to channels, make the code common in gui-gnome and gui-text
*** Big things
- keyboard configuration
- session saving thing.. specify what channels/queries/dcc chats to open in
which window (real/tabbed/in same window with some other), what irc net
channels goes to where, what channels/queries to open at startup, etc.
use dialog with gtktree widget to change it.
- split windows with gtkpaned (check window-views-patch.diff)
- really transparently working irc proxy, saves scrollback buffers, etc.
Or maybe the existing ones already work?
- some sort of address book? our own irssi ctcp to ask for other irssi users
for their information (of course not without asking (except optionally))..
could be nice also to automatically update it, keep track of all seen
users gathered when joining channels, whois, who, etc. commands.
automatically updating information could be host masks, nicks, ips, seen in
channels, operator in channels, .. user specified checks like last topic or
mode changes or even msgs to you/some channel/with some keyword. great for
spying people ;) maybe even useful sometimes..
.. but what database would be best for this?
- GTK version: icons to toolbars, accelerators to menus
- Windows style MDI windows are possible with GtkFixed .. Some people would
like this.. too much job for me, it would need building the MDI windows
ourself (title bar, borders, resizing, etc.)
- online help, documentation, ...
- plugins:
- perl plugin .. implementation problems, C's structures need to be
handled some way .. like for server structure get_address(),
get_port(), set_address(), set_port() etc..
- other scripting plugins would be easier? scheme, tcl, pythong?
sula premirex uses scheme, it would probably be pretty easy to learn
from it how to do it to irssi :)
- IRC bot, eggdrop is too old, needs a replacement ;)
- DCC file server, I'm not too excited about this, maybe someone else
wants to do it..
- Multiplayer games! :) Chess, tic-tac-toe, othello, battleship, tetris,
etc. Existing games should probably be used .. though there doesn't
seem to be any of these (except tetris) for gnome right now..
- audio / video chat :)
*** Little things
- command line parameter handling, specify what server/ircnet to autoconnect
or none.
- /list:
- gui optional
- sort it by clicking the headers
- change the size of columns
- total number of channels
- copy/paste things in list?
- search the list
- log option: add the open/close time to log
- log directory, automatically log all channels and queries there
- overwrite/append
- all windows, just queries, only the channels in channel list
- you can be joined to same channels in different irc networks (or even
the same ircnet!) - create the logs to different directiories/names
- use different themes in different channels/queries?
- improve msgslevels and ignoring .. Like ignoring "chan" doesn't work now.
It could be changed to joins, parts, quits, topics, nicks, .. just rip all
the msglevels from bitchx and use them :)
- use server-idle instead of channel.query thing..
- lag meter
- possibility to display different colors in nicks from different people..
and different colors for word hilighting too
- /connect ircnet could connect to ircnet
- change some GLists to GHashTables, aliases at least
- check new irssi versions with http rather than with irssibot..
- implement requesting files with DCC GET from remote client for dcc file
servers. good for people behind firewalls.
- support for ircii translation tables (/usr/lib/irc/translation/*)
- use different nicks/realnames in different irc networks
- zvt problems/todo:
- need some way to disable all the extra features, like sending 0x8e
messes up your fonts.
- the ugly cursor just keeps blinking
- when clicking an empty spot on screen it sometimes tells that there's
some weird crap in there..
- word wrapping
- notify list:
- dialog: keep track of hosts/realnames so after closing and opening the
dialog again they would show up..
- summary list (for irssi-text)
- nick-specific options:
- check for gone-flag changes (use userhosts instead of isons)
- create popup dialog
- run some command (like /exec as soon as I get that done :)
- gnome statubar:
- clock?
- dcc transfer meter (gtk progressbar)
- you could configure which events (whois, notify, etc.) to show in what
windows (all, current, status)
- gui for configuring plugin specific theme format texts
- awaylog (/log create ~/away.log -all +msgs or something), autoaway
- make window/save buffer and find work with zvt
- dcc send: allow selection of multiple files to send (also for dnd from
gmc!) Allow dropping files to anywhere in irssi.
- logging: longer format dd.mm.yy hh:mm:ss (configurable?)
- net split/join detection ? is this even needed? more harmful than useful?
- /timer, /clones
- run multiple commands with one alias (what was this needed for? can't
remember..)
- regexp for hilighting words?
- subcommands (dcc, window, ..) could use common function instead of copy and
pasting the same function all the time and modifying just two words...

25
acconfig.h Normal file
View File

@ -0,0 +1,25 @@
#undef HAVE_GTK
#undef HAVE_GNOME
#undef HAVE_GNOME_PANEL
#undef SYSCONFDIR
#undef PLUGINSDIR
#undef PERLSCRIPTDIR
#undef GTK_10
#undef HAVE_SOCKS_H
#undef HAVE_IMLIB
#undef MEM_DEBUG
#undef HAVE_IPV6
#undef GTK_HEBREW
#undef GTK_HEBREW_RC
#undef HAVE_NCURSES_USE_DEFAULT_COLORS
#undef HAVE_CURSES_IDCOK
#undef HAS_CURSES
#undef USE_SUNOS_CURSES
#undef USE_BSD_CURSES
#undef USE_SYSV_CURSES
#undef USE_NCURSES
#undef NO_COLOR_CURSES
#undef SCO_FLAVOR
#undef NCURSES_970530

21
autogen.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
# I'm too lazy to update version number into several places.. :)
version=`cat configure.in|grep AM_INIT_AUTOMAKE|perl -pe 's/^[^,]*,[ ]*([^\)]*).*/$1/'`
cat irssi.spec.in |sed s/^Version:/Version:\ $version/ > irssi.spec
PKG_NAME="Irssi"
(test -f $srcdir/configure.in \
## put other tests here
) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
. $srcdir/macros/autogen.sh

101
colorless.theme Normal file
View File

@ -0,0 +1,101 @@
{
default_color = 7;
colors = {};
formats = {
line_start = "-!- ";
line_start_irssi = "-!- Irssi: ";
connecting = "Connecting to %_$1%_ [$2] port %_$3%_";
disconnected = "Disconnected from %_$1%_ [$2]";
join = "%_$1%_ [$2] has joined %_$3";
cannot_join = "Cannot join to channel %_$1%_ [$2]";
part = "%_$1%_ [$2] has left %_$3%_ [$4]";
kick = "%_$1%_ was kicked from $2 by %_$3%_ [$4]";
quit = "%_$1%_ [$2] has quit IRC [$3]";
names = "[%_Users%_($1)] $2";
endofnames = "%_$1%_: Total of %_$2%_ nicks [%_$3%_ ops, %_$4%_ voices, %_$5%_ normal]";
topic = "Topic for $1: $2";
no_topic = "No topic set for $1";
new_topic = "%_$1%_ changed the topic of $2 to: $3";
topic_unset = "Topic unset by %_$1%_ on $2";
topic_info = "Topic set by %_$1%_ [$2]";
chanmode_change = "mode/$1 [$2] by %_$3";
channel_mode = "mode/$1 [$2]";
banlist = "%_$1%_: ban $2";
banlist_long = "%_$1%_: ban $2 [by %_$3%_, $4 secs ago]";
ebanlist = "%_$1%_: ban exception $2";
ebanlist_long = "%_$1%_: ban exception $2 [by %_$3%_, $4 secs ago]";
invitelist = "%_$1%_: invite $2";
usermode_change = "Mode change [%_$1%_] for user $2";
your_nick_changed = "You're now known as $1";
nick_changed = "%_$1%_ is now known as $2";
your_nick_owned = "Your nick is owned by %_$4%_ [$2@$3]";
whois = "%_$1%_ [$2@$3]%N ircname : $4";
whois_idle_signon = " idle : $2 hours $3 mins $4 secs [signon: $5]";
own_msg = "<$1> $2";
own_msg_channel = "<$1:$2> $3";
own_msg_private = "[msg($1)] $2";
own_notice = "[notice($1)] $2";
own_me = " * $1 $2";
own_ctcp = "[ctcp($1)] $2 $3";
own_dcc = "[dcc($1)] $2";
pubmsg_me = "<$1> $2";
pubmsg_me_channel = "<$1:$2> $3";
pubmsg = "<$1> $2";
pubmsg_channel = "<$1:$2> $3";
msg_private = "[$1($2)] $3";
dcc_msg = "[$1(dcc)] $2";
notice_server = "!$1 $2";
notice_public = "-$1:$2- $3";
notice_private = "-$1($2)- $3";
action_dcc = " (*dcc*) $1 $2";
action_private = " (*) $1 $2";
action_public = " * $1 $2";
action_public_channel = " * $1:$2 $3";
ctcp_reply = "CTCP %_$1%_ reply from %_$2%_: $3";
ctcp_requested = ">>> %_$1%_ [$2] requested %_$3%_ from %_$4";
dcc_ctcp = ">>> DCC CTCP received from %_$1%_: $2";
dcc_chat = "DCC CHAT from %_$1%_ [$2 port $3]";
dcc_chat_not_found = "No DCC CHAT connection open to %_$1";
dcc_chat_connected = "DCC %_CHAT%_ connection with %_$1%_ [$2 port $3] established";
dcc_chat_disconnected = "DCC lost chat to %_$1";
dcc_send = "DCC SEND from %_$1%_ [$2 port $3]: $4 [$5 bytes]";
dcc_send_exists = "DCC already sending file $1 for %_$2%_";
dcc_send_not_found = "DCC not sending file $2 to %_$1";
dcc_send_file_not_found = "DCC file not found: $1";
dcc_send_connected = "DCC sending file $1 for %_$2%_ [$3 port $4]";
dcc_send_complete = "DCC sent file $1 [%_$2%_kb] for %_$3%_ in %_$4%_ secs [%_$5kb/s%_]";
dcc_send_aborted = "DCC aborted sending file $1 for %_$2%_";
dcc_get_not_found = "DCC no file offered by %_$1";
dcc_get_connected = "DCC receiving file $1 from %_$2%_ [$3 port $4]";
dcc_get_complete = "DCC received file $1 [$2kb] from %_$3%_ in %_$4%_ secs [$5kb/s]";
dcc_get_aborted = "DCC aborted receiving file $1 from %_$2%_";
dcc_unknown_ctcp = "DCC unknown ctcp $1 from %_$2%_ [$3]";
dcc_unknown_reply = "DCC unknown reply $1 from %_$2%_ [$3]";
dcc_unknown_command = "DCC unknown command: $1";
dcc_unknown_type = "DCC unknown type %_$1";
dcc_connect_error = "DCC can't connect to %_$1%_ port %_$2";
dcc_cant_create = "DCC can't create file $1";
dcc_rejected = "DCC $1 was rejected by %_$2%_ [$3]";
dcc_close = "DCC $1 close for %_$2%_ [$3]";
log_opened = "Log file $1 opened";
log_open_failed = "Couldn't open log file $1";
log_not_open = "Log file $1 not open";
log_closed = "Closed log file $1";
log_listentry = "$1: $2";
log_sublistentry = " + $1: $2";
ircjoin = "%_$1%_ [$2@$3] [%_$4%_] has joined to IRC";
plugin_cant_load = "Can't load plugin %_$1%_";
plugin_not_loaded = "Plugin %_$1%_ not loaded";
};
plugins = {
sample = "start stop";
};
pluginformats = {
sample = {
start = "Sample plugin loaded";
stop = "Sample plugin unloaded";
};
};
}

36
config Normal file
View File

@ -0,0 +1,36 @@
{
setupservers = (
{server = irc.funet.fi;ircnet = ircnet;port = 6667;autoconnect = No;}
);
ircnets = ({name = ircnet;});
channels = (
{
name = "#irssi";
ircnet = ircnet;
autojoin = No;
}
);
aliases = (
{alias = J;command = "/join &1";},
{alias = LEAVE;command = "/part &1";},
{alias = BYE;command = "/quit &1";},
{alias = WI;command = "/whois &1";},
{alias = WII;command = "/whois %1 %1";},
{alias = WW;command = "/whowas &1";},
{alias = W;command = "/who *";},
{alias = N;command = "/names *";},
{alias = M;command = "/msg &1";},
{alias = T;command = "/topic &1";},
{alias = C;command = "/clear";},
{alias = CL;command = "/clear";},
{alias = K;command = "/kick &1";},
{alias = KB;command = "/kickban &1";},
{alias = KN;command = "/knockout &1";},
{alias = B;command = "/ban &1";},
{alias = UB;command = "/unban &1";},
{alias = IG;command = "/ignore &1";},
{alias = UNIG;command = "/unignore &1";}
);
}

363
configure.in Normal file
View File

@ -0,0 +1,363 @@
AC_INIT(src)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(irssi, 0.7.16)
AM_MAINTAINER_MODE
AM_ACLOCAL_INCLUDE(macros)
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_CPP
AC_STDC_HEADERS
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
AC_CHECK_HEADERS(string.h stdlib.h unistd.h dirent.h sys/ioctl.h)
GNOME_INIT
AC_ARG_WITH(proplist,
[ --with-proplist Specify libPropList location],
proplist_dir=$withval)
AC_ARG_WITH(socks,
[ --with-socks Build with socks support],
if test x$withval = xyes; then
want_socks=yes
else
if test "x$withval" = xno; then
want_socks=no
else
want_socks=yes
fi
fi,
want_socks=no)
AC_ARG_WITH(imlib,
[ --with-imlib Build with imlib support],
if test x$withval = xyes; then
want_imlib=yes
else
if test "x$withval" = xno; then
want_imlib=no
else
want_imlib=yes
fi
fi,
want_imlib=yes)
AC_ARG_WITH(gnome-panel,
[ --with-gnome-panel Build with gnome panel applet support],
if test x$withval = xyes; then
want_gnome_panel=yes
else
if test "x$withval" = xno; then
want_gnome_panel=no
else
want_gnome_panel=yes
fi
fi,
want_gnome_panel=yes)
AC_ARG_WITH(textui,
[ --with-textui Build irssi-text],
if test x$withval = xyes; then
want_textui=yes
else
if test "x$withval" = xno; then
want_textui=no
else
want_textui=yes
fi
fi,
want_textui=yes)
AC_ARG_WITH(plugins,
[ --with-plugins Build plugins],
if test x$withval = xyes; then
want_plugins=yes
else
if test "x$withval" = xno; then
want_plugins=no
else
want_plugins=yes
fi
fi,
want_plugins=yes)
AC_ARG_WITH(servertest,
[ --with-servertest Build servertest],
if test x$withval = xyes; then
want_servertest=yes
else
if test "x$withval" = xno; then
want_servertest=no
else
want_servertest=yes
fi
fi,
want_servertest=no)
AC_ARG_ENABLE(memdebug,
[ --enable-memdebug Enable memory debugging],
if test x$enableval = xyes; then
want_memdebug=yes
else
if test "x$enableval" = xno; then
want_memdebug=no
else
want_memdebug=yes
fi
fi,
want_memdebug=no)
AC_ARG_ENABLE(ipv6,
[ --enable-ipv6 Enable IPv6 support],
if test x$enableval = xyes; then
want_ipv6=yes
else
if test "x$enableval" = xno; then
want_ipv6=no
else
want_ipv6=yes
fi
fi,
want_ip6=no)
AC_ARG_ENABLE(gtk-hebrew,
[ --enable-gtk-hebrew Enable Hebrew support],
if test "x$enableval" = xno; then
want_gtk_hebrew=no
HEBREW_LIBS=""
else
AC_DEFINE(GTK_HEBREW)
AC_DEFINE_UNQUOTED(GTK_HEBREW_RC, "$enableval")
HEBREW_LIBS="-lfribidi"
want_gtk_hebrew=yes
fi,
want_gtk_hebrew=no)
dnl **
dnl ** just some generic stuff...
dnl **
AC_CHECK_FUNCS(mkfifo)
AC_CHECK_LIB(socket, socket, [
LIBS="$LIBS -lsocket"
])
AC_CHECK_LIB(nsl, inet_addr, [
LIBS="$LIBS -lnsl"
], -lsocket)
# gcc specific options
if test "x$ac_cv_prog_gcc" = "xyes"; then
CFLAGS="$CFLAGS -Wall"
fi
if test "x$prefix" = "xNONE"; then
prefix="/usr/local"
else
prefix=$prefix
fi
AM_CONDITIONAL(BUILD_PLUGINS, test "x$want_plugins" = "xyes")
AM_CONDITIONAL(BUILD_SERVERTEST, test "x$want_servertest" = "xyes")
AC_DEFINE_UNQUOTED(SYSCONFDIR, "$prefix/etc")
AC_DEFINE_UNQUOTED(PLUGINSDIR, "$prefix/lib/irssi/plugins")
dnl **
dnl ** check for libPropList
dnl **
if test "x$proplist_dir" = "x"; then
proplib=
else
proplib=-L$proplist_dir/lib
fi
AC_CHECK_LIB(PropList, PLSave, [
LIBS="$LIBS $proplib -lPropList"
if test "x$proplist_dir" != "x"; then
CFLAGS="$CFLAGS -I$proplist_dir/include"
fi
], [
echo "ERROR: Irssi needs libPropList for configuration file handling."
echo "Go get it from http://xlife.dhs.org/irssi/download.php"
AC_ERROR(["libPropList not found"])
], $LIBS $proplib -lPropList)
dnl **
dnl ** check for socks
dnl **
if test "x$want_socks" = "xyes"; then
AC_CHECK_LIB(socks, connect, [
LIBS="$LIBS -lsocks"
AC_CHECK_HEADER(socks.h, [
AC_DEFINE(HAVE_SOCKS_H)
CFLAGS="$CFLAGS -DSOCKS"
AC_MSG_RESULT(["socks5 library found, building with it"])
], [
AC_MSG_RESULT(["socks4 library found, building with it"])
CFLAGS="$CFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dgetpeername=Rgetpeername -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
])
])
fi
dnl **
dnl ** check for gnome
dnl **
if test "x$want_gnome" = "xyes"; then
if test "x$GNOME_LIBS" = "x"; then
want_gnome="no";
fi
fi
AM_CONDITIONAL(HAVE_GNOME, test "x$want_gnome" = "xyes")
if test "x$want_gnome" = "xyes"; then
AC_DEFINE(HAVE_GTK)
AC_DEFINE(HAVE_GNOME)
GNOME_SUPPORT_CHECKS
GUI_CFLAGS="$GNOME_INCLUDEDIR"
dnl **
dnl ** check for gnome panel applet library
dnl **
if test "x$want_gnome_panel" = "xyes"; then
AC_CHECK_LIB(panel_applet, applet_widget_init, [
GUI_LIBS="$GNOME_LIBDIR $GNOMEGNORBA_LIBS $ZVT_LIBS -lpanel_applet"
AC_DEFINE(HAVE_GNOME_PANEL)
], [
GUI_LIBS="$GNOME_LIBDIR $GNOMEUI_LIBS $ZVT_LIBS"
want_gnome_panel="no"
], $GNOME_LIBDIR $GNOMEGNORBA_LIBS -lpanel_applet)
else
GUI_LIBS="$GNOME_LIBDIR $GNOMEUI_LIBS $ZVT_LIBS"
fi
else
want_gnome_panel="no"
AC_DEFINE(HAVE_GTK)
AM_PATH_GTK(1.2.0)
GUI_CFLAGS="$GTK_CFLAGS"
GUI_LIBS="$GTK_LIBS"
if test "x$gtk_config_minor_version" = "x0"; then
AC_DEFINE(GTK_10)
fi
if test "x$want_imlib" = "xyes"; then
AM_PATH_GDK_IMLIB(, [define_imlib=true])
if test x$define_imlib = xtrue; then
AC_DEFINE(HAVE_IMLIB)
GUI_CFLAGS="$GUI_CFLAGS $GDK_IMLIB_CFLAGS"
GUI_LIBS="$GDK_IMLIB_LIBS"
fi
fi
fi
if test "x$GUI_LIBS" != "x"; then
GUI_LIBS="$GUI_LIBS $HEBREW_LIBS"
fi
AC_SUBST(GUI_LIBS)
AC_SUBST(GUI_CFLAGS)
AM_CONDITIONAL(BUILD_GNOMEUI, test "x$GUI_LIBS" != "x")
AM_CONDITIONAL(HAVE_GNOME_PANEL, test "x$want_gnome_panel" = "xyes")
dnl **
dnl ** gui-text checks
dnl **
AM_PATH_GLIB(1.2.0,,, gmodule)
dnl **
dnl ** curses checks
dnl **
if test "x$want_textui" = "xyes"; then
AC_CHECK_CURSES
if test "x$ncurses_version" != "x"; then
AC_CHECK_LIB(ncurses, use_default_colors, [
AC_DEFINE(HAVE_NCURSES_USE_DEFAULT_COLORS)
],, $CURSES_LIBS)
AC_CHECK_LIB(ncurses, idcok, [
AC_DEFINE(HAVE_CURSES_IDCOK)
],, $CURSES_LIBS)
else
AC_CHECK_LIB(curses, idcok, [
AC_DEFINE(HAVE_CURSES_IDCOK)
],, $CURSES_LIBS)
fi
else
has_curses=false
fi
AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true)
dnl **
dnl ** memory debugging
dnl **
if test "x$want_memdebug" = "xyes"; then
AC_DEFINE(MEM_DEBUG)
fi
AM_CONDITIONAL(BUILD_MEMDEBUG, test "x$want_memdebug" = "xyes")
dnl **
dnl ** IPv6 support
dnl **
if test "x$want_ipv6" = "xyes"; then
AC_DEFINE(HAVE_IPV6)
fi
dnl **
dnl ** internationalization support
dnl **
dnl ALL_LINGUAS=""
dnl AM_GNU_GETTEXT
dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
AC_OUTPUT(
Makefile
dnl ## internationalization support
dnl po/Makefile.in
dnl intl/Makefile
macros/Makefile
src/Makefile
src/irc-base/Makefile
src/irc-extra/Makefile
src/ui-common/Makefile
src/gui-none/Makefile
src/gui-text/Makefile
src/gui-gnome/Makefile
src/gui-gnome/help/Makefile
src/gui-gnome/help/C/Makefile
src/gui-gnome/pixmaps/Makefile
src/lib-config/Makefile
src/lib-nongui/Makefile
src/settings/Makefile
servertest/Makefile
plugins/Makefile
plugins/sample/Makefile
plugins/speech/Makefile
plugins/sound/Makefile
plugins/proxy/Makefile
plugins/external/Makefile
plugins/bot/Makefile
stamp.h)
dnl **
dnl ** internationalization support
dnl **
dnl stamp.h],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])

5
file2header.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
echo "gchar *default_config ="
cat $1|sed 's/\\/\\\\/g'|sed 's/"/\\"/g'|sed 's/^/\"/'|sed 's/$/\\n\"/'
echo ";"

6
irssi.desktop Normal file
View File

@ -0,0 +1,6 @@
[Desktop Entry]
Name=irssi
Comment=irssi IRC client
Exec=irssi
Terminal=0
Type=Application

5
irssi.gnorba Normal file
View File

@ -0,0 +1,5 @@
[irssi]
type=exe
repo_id=IDL:GNOME/Applet:1.0
description=irssi IRC client
location_info=irssi

87
irssi.spec.in Normal file
View File

@ -0,0 +1,87 @@
Name: irssi
Version:
Release: 1
Packager: Red Hat Contrib|Net <rhcn-bugs@redhat.com>
Vendor: Timo Sirainen <cras@irccrew.org>
Distribution: Red Hat Contrib|Net
Summary: Irssi is a GTK based IRC client
Copyright: GPL
Group: X11/Applications/Networking
URL: http://xlife.dhs.org/irssi/
Source: http://xlife.dhs.org/irssi/files/%{name}-%{version}.tar.bz2
Requires: gtk+
Prefix: /usr
BuildRoot: /tmp/%{name}-%{version}
%changelog
* Sun Aug 29 1999 JT Traub <jtraub@dragoncat.net>
- Updated to 0.7.15 sources
- Fixed config stuff that changed since last version.
* Thu Mar 25 1999 JT Traub <jtraub@dragoncat.net>
- Updated sources
* Sat Mar 13 1999 JT Traub <jtraub@dragoncat.net>
- Updated to 0.7.4 sources
- Added the irssi-text bin to the package.
* Mon Feb 22 1999 JT Traub <jtraub@dragoncat.net>
- Made spec file compliant with RHCN guidelines.
* Sun Feb 13 1999 JT Traub <jtraub@dragoncat.net>
- Updated to 0.6.0 sources.
- Cleaned up spec file to make it relocatable on install
* Sun Feb 7 1999 JT Traub <jtraub@dragoncat.net>
- Updated sources to 0.5.0
- removed obsolete patch lines
* Sat Feb 3 1999 JT Traub <jtraub@dragoncat.net>
- Updated sources to 0.4.0
- Deleted old patch line
* Sat Jan 30 1999 JT Traub <jtraub@dragoncat.net>
- Updated sources to 0.3.6
- Updated spec to install the .desktop file.
- Removed the now obsolete patch lines
* Wed Jan 27 1999 JT Traub <jtraub@dragoncat.net>
- Upgraded to 0.3.5
* Sun Jan 24 1999 JT Traub <jtraub@dragoncat.net>
- First attempt at building this
%description
Irssi is a GTK based GUI IRC client by Timo Sirainen <cras@irccrew.org>.
More information can be found at http://xlife.dhs.org/irssi/.
%prep
%setup
%build
./configure --prefix=%{prefix}
make
%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install
strip $RPM_BUILD_ROOT%{prefix}/bin/irssi
strip $RPM_BUILD_ROOT%{prefix}/bin/irssi-text
strip $RPM_BUILD_ROOT%{prefix}/bin/irssi-bot
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-,root,root)
%doc AUTHORS COPYING INSTALL ChangeLog README TODO NEWS
%attr(755,root,root) %{prefix}/bin/irssi
%attr(755,root,root) %{prefix}/bin/irssi-text
%attr(755,root,root) %{prefix}/bin/irssi-bot
%attr(644,root,root) %config %{prefix}/etc/irssi/*
%attr(644,root,root) %{prefix}/etc/CORBA/servers/irssi.gnorba
%attr(644,root,root) %{prefix}/share/applets/Network/irssi.desktop
%attr(644,root,root) %{prefix}/share/gnome/help/irssi/C/*
%attr(644,root,root) %{prefix}/lib/irssi/plugins/*

8
servertest/.cvsignore Normal file
View File

@ -0,0 +1,8 @@
*.la
*.lo
.deps
.libs
Makefile
Makefile.in
so_locations
ircserver

13
servertest/Makefile.am Normal file
View File

@ -0,0 +1,13 @@
bin_PROGRAMS = ircserver
INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir)/src
if BUILD_MEMDEBUG
memdebug_src=../src/irc-base/memdebug.o
else
memdebug_src=
endif
ircserver_LDADD = -lglib ../src/irc-base/network.o $(memdebug_src)
ircserver_SOURCES = server.c

463
servertest/server.c Normal file
View File

@ -0,0 +1,463 @@
#include <common.h>
#include <irc-base/network.h>
#define FLOOD_TIMEOUT 100000
typedef struct
{
gchar *name;
GList *nicks;
}
CHANNEL_REC;
GList *channels;
gchar *clientnick, *clienthost;
int clienth;
/* Read a line */
gint read_line(gboolean socket, gint handle, GString *output, GString *buffer)
{
gchar tmpbuf[512];
gint recvlen, pos;
g_return_val_if_fail(handle != -1, -1);
g_return_val_if_fail(output != NULL, -1);
g_return_val_if_fail(buffer != NULL, -1);
g_string_truncate(output, 0);
recvlen = socket ?
net_receive(handle, tmpbuf, sizeof(tmpbuf)-1) :
read(handle, tmpbuf, sizeof(tmpbuf)-1);
if (recvlen <= 0)
{
if (buffer->len > 0)
{
/* no new data got but still something in buffer.. */
for (pos = 0; pos < buffer->len; pos++)
{
if (buffer->str[pos] == 13 || buffer->str[pos] == 10)
{
recvlen = 0;
break;
}
}
if (recvlen < 0 && buffer->len > 0)
{
/* connection closed and last line is missing \n ..
just add it so we can see if it had anything useful.. */
recvlen = 0;
g_string_append_c(buffer, '\n');
}
}
if (recvlen < 0) return -1;
}
else
{
/* append received data to buffer */
tmpbuf[recvlen] = '\0';
g_string_append(buffer, tmpbuf);
}
for (pos = 0; pos < buffer->len; pos++)
{
if (buffer->str[pos] == 13 || buffer->str[pos] == 10)
{
/* end of line */
buffer->str[pos] = '\0';
g_string_assign(output, buffer->str);
if (buffer->str[pos] == 13 && buffer->str[pos+1] == 10)
{
/* skip \n too */
pos++;
}
g_string_erase(buffer, 0, pos+1);
return 1;
}
}
/* EOL wasn't found, wait for more data.. */
return 0;
}
void client_send(char *text)
{
write(clienth, text, strlen(text));
write(clienth, "\r\n", 2);
}
void makerand(char *str, int len)
{
for (; len > 0; len--)
*str++ = (rand() % 20)+'A';
}
void makerand2(char *str, int len)
{
#if 0
gchar c;
while (len > 0)
{
c = rand() & 255;
if (c != 0 && c != 13 && c != 10)
{
*str++ = c;
len--;
}
}
#else
makerand(str, len);
#endif
}
void send_cmd(void)
{
static gint nicks = 0;
GList *tmp;
char str[512];
int pos;
/* send msg to every channel */
str[511] = '\0';
for (tmp = g_list_first(channels); tmp != NULL; tmp = tmp->next)
{
CHANNEL_REC *rec = tmp->data;
makerand(str, 511);
str[0] = ':';
str[10] = '!';
str[20] = '@';
switch (rand() % 10)
{
case 0:
/* join */
pos = 2+sprintf(str+2, "%d", nicks++); /* don't use same nick twice */
str[pos] = '-';
str[10] = '\0';
g_list_append(rec->nicks, g_strdup(str+1));
str[10] = '!';
sprintf(str+30, " JOIN :%s", rec->name);
break;
case 1:
/* part */
if (g_list_length(rec->nicks) > 1 && rand() % 3 == 0)
{
gchar *nick;
nick = g_list_nth(rec->nicks, rand()%(g_list_length(rec->nicks)-1)+1)->data;
if (rand() % 3 == 0)
sprintf(str, ":kicker!some@where KICK %s %s :go away", rec->name, nick);
else if (rand() % 3 == 0)
sprintf(str, ":%s!dunno@where QUIT %s :i'm outta here", nick, rec->name);
else
sprintf(str, ":%s!dunno@where PART %s", nick, rec->name);
rec->nicks = g_list_remove(rec->nicks, nick);
g_free(nick);
}
else
str[0] = '\0';
break;
case 2:
/* nick change */
if (g_list_length(rec->nicks) > 1)
{
gchar *nick;
nick = g_list_nth(rec->nicks, rand()%(g_list_length(rec->nicks)-1)+1)->data;
pos = sprintf(str, ":%s!dunno@where NICK ", nick);
str[pos] = '_';
str[50] = '\0';
rec->nicks = g_list_remove(rec->nicks, nick);
rec->nicks = g_list_append(rec->nicks, g_strdup(str+pos));
g_free(nick);
}
else
str[0] = '\0';
break;
case 3:
/* topic */
pos = 30+sprintf(str+30, " TOPIC %s :", rec->name);
str[pos] = 'x';
break;
case 4:
/* mode */
sprintf(str+30, " MODE %s :%cnt", rec->name, (rand() & 1) ? '+' : '-');
break;
case 5:
/* notice */
pos = 30+sprintf(str+30, " NOTICE %s :", rec->name);
str[pos] = 'X';
break;
case 6:
/* nick mode change */
if (g_list_length(rec->nicks) > 1)
{
gchar *nick;
nick = g_list_nth(rec->nicks, rand()%(g_list_length(rec->nicks)-1)+1)->data;
pos = sprintf(str, ":server MODE %s +%c %s", rec->name, rand()&1 ? 'o' : 'v', nick);
str[pos] = '_';
str[50] = '\0';
rec->nicks = g_list_remove(rec->nicks, nick);
rec->nicks = g_list_append(rec->nicks, g_strdup(str+pos));
g_free(nick);
}
else
str[0] = '\0';
break;
default:
pos = 30+sprintf(str+30, " PRIVMSG %s :", rec->name);
makerand2(str+pos, 511-pos);
if (rand() % 4 == 0)
{
pos += sprintf(str+pos, "\001ACTION ");
str[510] = 1;
}
else if (rand() % 10 == 0)
{
pos += sprintf(str+pos, "\001VERSION\001");
pos++;
}
else if (rand() % 2 == 0)
{
pos += sprintf(str+pos, "%s: ", clientnick);
}
str[pos] = 'X';
break;
}
client_send(str);
}
makerand(str, 511);
str[0] = ':';
str[10] = '!';
str[20] = '@';
switch (rand() % 11)
{
case 0:
/* join */
if (g_list_length(channels) < 20)
{
CHANNEL_REC *rec;
int n, pos;
n = (rand()%20)+25;
pos = sprintf(str, ":%s!%s JOIN :", clientnick, clienthost);
str[pos] = '#';
str[n] = '\0';
rec = g_new(CHANNEL_REC, 1);
rec->name = g_strdup(str+pos);
rec->nicks = g_list_append(NULL, g_strdup(clientnick));
channels = g_list_append(channels, rec);
client_send(str);
sprintf(str, ":server 353 %s = %s :@%s", clientnick, rec->name, clientnick);
client_send(str);
sprintf(str, ":server 366 %s %s :End of /NAMES list.", clientnick, rec->name);
}
else
str[0] = '\0';
break;
case 1:
/* leave channel (by kick) */
if (g_list_length(channels) > 3)
{
CHANNEL_REC *chan;
chan = g_list_nth(channels, rand()%g_list_length(channels))->data;
if (rand() % 3 != 0)
{
pos = sprintf(str, ":%s!%s PART %s :", clientnick, clienthost, chan->name);
str[pos] = 'x';
}
else
{
str[0] = ':';
sprintf(str+30, " KICK %s %s :byebye", chan->name, clientnick);
}
g_free(chan->name);
g_list_foreach(chan->nicks, (GFunc) g_free, NULL); g_list_free(chan->nicks);
g_free(chan);
channels = g_list_remove(channels, chan);
}
else
str[0] = '\0';
break;
case 2:
/* ctcp version */