Fixup fromcvs/togit conversion
[pkgsrcv2.git] / chat / irssi-icb / patches / patch-am
1 $NetBSD$
2
3 --- /dev/null   2009-11-03 03:54:19.098165668 +0100
4 +++ src/core/icb-nicklist.c     2010-05-21 13:03:14.227283420 +0200
5 @@ -0,0 +1,44 @@
6 +/*
7 + icb-nicklist.c : irssi
8 +
9 +    Copyright (C) 2010 Jonathan Perkin
10 +
11 +    This program is free software; you can redistribute it and/or modify
12 +    it under the terms of the GNU General Public License as published by
13 +    the Free Software Foundation; either version 2 of the License, or
14 +    (at your option) any later version.
15 +
16 +    This program is distributed in the hope that it will be useful,
17 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
18 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 +    GNU General Public License for more details.
20 +
21 +    You should have received a copy of the GNU General Public License
22 +    along with this program; if not, write to the Free Software
23 +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 +*/
25 +
26 +#include "module.h"
27 +#include "signals.h"
28 +
29 +#include "icb-channels.h"
30 +#include "icb-nicklist.h"
31 +
32 +/* Add new nick to list*/
33 +NICK_REC *icb_nicklist_insert(ICB_CHANNEL_REC *channel, const char *nick,
34 +                             int mod)
35 +{
36 +       NICK_REC *rec;
37 +
38 +       g_return_val_if_fail(IS_ICB_CHANNEL(channel), NULL);
39 +       g_return_val_if_fail(nick != NULL, NULL);
40 +
41 +       rec = g_new0(NICK_REC, 1);
42 +       rec->nick = g_strdup(nick);
43 +
44 +       /* Just use existing 'op' for moderator */
45 +       if (mod) rec->op = TRUE;
46 +
47 +       nicklist_insert(CHANNEL(channel), rec);
48 +       return rec;
49 +}