~ubuntu-branches/ubuntu/lucid/inspircd/lucid-security

« back to all changes in this revision

Viewing changes to src/modules/m_timedbans.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Giacomo Catenazzi, Darren Blaber, Matt Arnold, Giacomo Catenazzi
  • Date: 2008-03-06 07:56:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080306075647-z8a4phxkn3vo3ajx
Tags: 1.1.17+dfsg-1
[ Darren Blaber ]
* New upstream release, fix /etc/init.d/inspircd stop.
* Fix the postrm script so there is no duplicate update-rc.d
* Fix the manpage so there are no more errors in it

[ Matt Arnold ]
*  Fix prerm so it works (Closes: #466924)

[ Giacomo Catenazzi ]
* Added me as uploader
* Add again support of dpatch in debian/rules
* Build sources only once!
* Correct make clean target, not to include generated ./inspircd on sources
* Don't change permission of configuration files, when starting inspircd
  (separation of policy and program).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *       | Inspire Internet Relay Chat Daemon |
3
3
 *       +------------------------------------+
4
4
 *
5
 
 *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
 
5
 *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6
6
 * See: http://www.inspircd.org/wiki/index.php/Credits
7
7
 *
8
8
 * This program is free but copyrighted software; see
89
89
                                                was_added = true;
90
90
                                if (was_added)
91
91
                                {
 
92
                                        CUList tmp;
92
93
                                        T.channel = channelname;
93
94
                                        T.mask = mask;
94
95
                                        T.expire = expire;
95
96
                                        TimedBanList.push_back(T);
96
 
                                        channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
 
97
                                        channel->WriteAllExcept(user, true, '@', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
 
98
                                        channel->WriteAllExcept(user, true, '%', tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
97
99
                                        return CMD_SUCCESS;
98
100
                                }
99
101
                                return CMD_FAILURE;
161
163
                                        again = true;
162
164
                                        if (cr)
163
165
                                        {
164
 
                                                cr->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
165
166
                                                const char *setban[3];
166
167
                                                setban[0] = i->channel.c_str();
167
168
                                                setban[1] = "-b";
172
173
                                                // hash and set its descriptor to FD_MAGIC_NUMBER so the data
173
174
                                                // falls into the abyss :p
174
175
                                                userrec* temp = new userrec(ServerInstance);
 
176
                                                CUList empty;
175
177
                                                temp->SetFd(FD_MAGIC_NUMBER);
 
178
                                                cr->WriteAllExcept(temp, true, '@', empty, "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
 
179
                                                cr->WriteAllExcept(temp, true, '%', empty, "NOTICE %s :Timed ban on %s expired.", cr->name, i->mask.c_str());
176
180
                                                /* FIX: Send mode remotely*/
177
181
                                                std::deque<std::string> n;
178
182
                                                n.push_back(setban[0]);