~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to debian/patches/07ctcp-channel

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-02-05 23:17:04 UTC
  • Revision ID: james.westby@ubuntu.com-20080205231704-gl9bsdgdfweyk3ff
Tags: 0.8.12-3ubuntu1
* Merge from debian unstable, remaining changes (LP: #181641):
  - Added debian/patches/90irc-ubuntu-com.dpatch (Launchpad #52690).
    New with this merge: We now also apply this patch.
  - Modify Maintainer value to match the DebianMaintainerField spec.
  - debian/irssi.prerm: Don't remove alternative on upgrades (LP #67698).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Author: Geert & exg     vim:ft=diff:
 
2
Description: Do not allow /ping by itself to ctcp ping a channel. (upstream svn r4640)
 
3
 
 
4
Index: irssi-0.8.12/docs/help/in/ping.in
 
5
===================================================================
 
6
--- irssi-0.8.12.orig/docs/help/in/ping.in
 
7
+++ irssi-0.8.12/docs/help/in/ping.in
 
8
@@ -1,10 +1,10 @@
 
9
 
 
10
 @SYNTAX:ping@
 
11
 
 
12
-Sends CTCP PING to another IRC client. This is used
 
13
-to find out the speed of IRC network. When the PING
 
14
-reply comes in, irssi shows the interval time between
 
15
-sending the request and receiving the reply.
 
16
+Sends CTCP PING to another IRC client or to an IRC channel.
 
17
+This is used to find out the speed of IRC network. When
 
18
+the PING reply comes in, irssi shows the interval time
 
19
+between sending the request and receiving the reply.
 
20
 
 
21
 See also: CTCP
 
22
 
 
23
Index: irssi-0.8.12/src/irc/core/irc-commands.c
 
24
===================================================================
 
25
--- irssi-0.8.12.orig/src/irc/core/irc-commands.c
 
26
+++ irssi-0.8.12/src/irc/core/irc-commands.c
 
27
@@ -504,7 +504,7 @@ static void cmd_whowas(const char *data,
 
28
        cmd_params_free(free_arg);
 
29
 }
 
30
 
 
31
-/* SYNTAX: PING <nicks> */
 
32
+/* SYNTAX: PING [<nick> | <channel> | *] */
 
33
 static void cmd_ping(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
 
34
 {
 
35
        GTimeVal tv;
 
36
@@ -512,10 +512,9 @@ static void cmd_ping(const char *data, I
 
37
 
 
38
         CMD_IRC_SERVER(server);
 
39
 
 
40
-       if (*data == '\0' || strcmp(data, "*") == 0) {
 
41
-               if (!IS_IRC_ITEM(item))
 
42
-                        cmd_return_error(CMDERR_NOT_JOINED);
 
43
-
 
44
+       if (*data == '\0') {
 
45
+               if (!IS_QUERY(item))
 
46
+                       cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
 
47
                data = window_item_get_target(item);
 
48
        }
 
49