~ubuntu-branches/ubuntu/karmic/cgiirc/karmic-updates

« back to all changes in this revision

Viewing changes to debian/patches/50_allow-port.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Mario Holbe
  • Date: 2004-11-08 14:11:52 UTC
  • Revision ID: james.westby@ubuntu.com-20041108141152-4e8m7ca2d8s0zvyy
Tags: 0.5.4-6
* Mario
  + typo in *index.html
* Elrond
  + add debian/watch
  + add 50_reconnect-link.dpatch by Pabs <pabs@zip.to>
    to create link back to login page at /quit
    (Closes: #268794)
* Mario and Elrond
  + fixup our advanced input boxes for IE (heavy work!)
  + Add warnings not to change debian specific settings
    like image_path (closes: #264598)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 50_allow-port.dpatch by Mario Holbe <Mario.Holbe@RZ.TU-Ilmenau.DE>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Add allow_port as a possible config option.
 
6
 
 
7
 
 
8
diff -ur cgiirc-0.5.4.orig/cgiirc.config.full cgiirc-0.5.4/cgiirc.config.full
 
9
--- cgiirc-0.5.4.orig/cgiirc.config.full        2003-10-29 13:28:32.000000000 +0100
 
10
+++ cgiirc-0.5.4/cgiirc.config.full     2004-06-06 14:54:51.000000000 +0200
 
11
@@ -78,8 +78,8 @@
 
12
 # it is killed (kill -9) or maybe a bug - this option still counts those as users.
 
13
 #max_users = 20
 
14
 
 
15
-# Allow access to servers and channels not set in the default
 
16
-# settings above and use access_channel and access_server below.
 
17
+# Allow access to servers, ports and channels not set in the default
 
18
+# settings above and use access_channel, access_port and access_server below.
 
19
 allow_non_default = 1
 
20
 
 
21
 # This is regular experssion that sets what channels access should
 
22
@@ -90,6 +90,10 @@
 
23
 # be allowed to.
 
24
 access_server = .*
 
25
 
 
26
+# This is regular experssion that sets what ports access should
 
27
+# be allowed to.
 
28
+access_port = .*
 
29
+
 
30
 # A list of commands to allow and deny access to, this is a space
 
31
 # seperated list of commands to allow access to or if prefixed 
 
32
 # with an ! commands to disallow access to.
 
33
diff -ur cgiirc-0.5.4.orig/formats/dark cgiirc-0.5.4/formats/dark
 
34
--- cgiirc-0.5.4.orig/formats/dark      2003-10-29 13:28:33.000000000 +0100
 
35
+++ cgiirc-0.5.4/formats/dark   2004-06-06 14:29:51.000000000 +0200
 
36
@@ -2,8 +2,9 @@
 
37
 connecting = {prefix-client} Connecting to {server $0} [$1] port {hilight $2}
 
38
 
 
39
 access denied = {prefix-client} Access Denied: $0
 
40
-access server denied = {prefix-client} Access to that server is blocked
 
41
-access channel denied = {prefix-client} Access to that channel is blocked
 
42
+access server denied = {prefix-client} Access to server $0 is blocked
 
43
+access port denied = {prefix-client} Access to port $0 is blocked
 
44
+access channel denied = {prefix-client} Access to channel $0 is blocked
 
45
 command denied = {prefix-client} Access to that command is blocked
 
46
 session timeout = {prefix-client} Timeout - Your session has been inactive too long
 
47
 
 
48
diff -ur cgiirc-0.5.4.orig/formats/default cgiirc-0.5.4/formats/default
 
49
--- cgiirc-0.5.4.orig/formats/default   2003-10-29 13:28:33.000000000 +0100
 
50
+++ cgiirc-0.5.4/formats/default        2004-06-06 14:30:28.000000000 +0200
 
51
@@ -2,8 +2,9 @@
 
52
 connecting = {prefix-client} Connecting to {server $0} [$1] port {hilight $2}
 
53
 
 
54
 access denied = {prefix-client} Access Denied: $0
 
55
-access server denied = {prefix-client} Access to that server is blocked
 
56
-access channel denied = {prefix-client} Access to that channel is blocked
 
57
+access server denied = {prefix-client} Access to server $0 is blocked
 
58
+access port denied = {prefix-client} Access to port $0 is blocked
 
59
+access channel denied = {prefix-client} Access to channel $0 is blocked
 
60
 command denied = {prefix-client} Access to that command is blocked
 
61
 session timeout = {prefix-client} Timeout - Your session has been inactive too long
 
62
 
 
63
diff -ur cgiirc-0.5.4.orig/formats/gothic cgiirc-0.5.4/formats/gothic
 
64
--- cgiirc-0.5.4.orig/formats/gothic    2003-10-29 13:28:33.000000000 +0100
 
65
+++ cgiirc-0.5.4/formats/gothic 2004-06-06 14:30:56.000000000 +0200
 
66
@@ -2,8 +2,9 @@
 
67
 connecting = {prefix-client} Connecting to {server $0} [$1] port {hilight $2}
 
68
 
 
69
 access denied = {prefix-client} Access Denied: $0
 
70
-access server denied = {prefix-client} Access to that server is blocked
 
71
-access channel denied = {prefix-client} Access to that channel is blocked
 
72
+access server denied = {prefix-client} Access to server $0 is blocked
 
73
+access port denied = {prefix-client} Access to port $0 is blocked
 
74
+access channel denied = {prefix-client} Access to channel $0 is blocked
 
75
 command denied = {prefix-client} Access to that command is blocked
 
76
 session timeout = {prefix-client} Timeout - Your session has been inactive too long
 
77
 
 
78
diff -ur cgiirc-0.5.4.orig/formats/mirc cgiirc-0.5.4/formats/mirc
 
79
--- cgiirc-0.5.4.orig/formats/mirc      2003-10-29 13:28:33.000000000 +0100
 
80
+++ cgiirc-0.5.4/formats/mirc   2004-06-06 14:31:32.000000000 +0200
 
81
@@ -2,8 +2,9 @@
 
82
 connecting = {prefix-client} Connecting to {server $0} [$1] port {hilight $2}
 
83
 
 
84
 access denied = {prefix-error} Access Denied: $0
 
85
-access server denied = {prefix-error} Access to that server is blocked
 
86
-access channel denied = {prefix-error} Access to that channel is blocked
 
87
+access server denied = {prefix-error} Access to server $0 is blocked
 
88
+access port denied = {prefix-error} Access to port $0 is blocked
 
89
+access channel denied = {prefix-error} Access to channel $0 is blocked
 
90
 command denied = {prefix-error} Access to that command is blocked
 
91
 session timeout = {prefix-error} Timeout - Your session has been inactive too long
 
92
 
 
93
diff -ur cgiirc-0.5.4.orig/formats/russian cgiirc-0.5.4/formats/russian
 
94
--- cgiirc-0.5.4.orig/formats/russian   2003-10-29 13:28:33.000000000 +0100
 
95
+++ cgiirc-0.5.4/formats/russian        2004-06-06 14:46:22.000000000 +0200
 
96
@@ -3,8 +3,9 @@
 
97
 connecting = {prefix-client} ����������� � {server $0} [$1] port {hilight $2}
 
98
 
 
99
 access denied = {prefix-client} ������ ������: $0
 
100
-access server denied = {prefix-client} ������ � ������� ����������
 
101
-access channel denied = {prefix-client} ������ � ������ ����������
 
102
+access server denied = {prefix-client} ������ � ������� $0 ����������
 
103
+access port denied = {prefix-client} ������ � ����� $0 ����������
 
104
+access channel denied = {prefix-client} ������ � ������ $0 ����������
 
105
 command denied = {prefix-client} ������������� ������ ������� ���������
 
106
 session timeout = {prefix-client} ������� - ���� ������ ���� ������� ����� �� �������
 
107
 
 
108
diff -ur cgiirc-0.5.4.orig/nph-irc.cgi cgiirc-0.5.4/nph-irc.cgi
 
109
--- cgiirc-0.5.4.orig/nph-irc.cgi       2004-01-29 12:24:48.000000000 +0100
 
110
+++ cgiirc-0.5.4/nph-irc.cgi    2004-06-06 14:27:55.000000000 +0200
 
111
@@ -1064,8 +1064,6 @@
 
112
    $cgi->{nick} ||= $config->{default_nick};
 
113
    $cgi->{name} ||= $config->{default_name};
 
114
 
 
115
-   ($cgi->{port}) = $cgi->{port} =~ /(\d+)/;
 
116
-
 
117
    $cgi->{nick} =~ s/\?/int rand 10/eg;
 
118
    # Only valid nickname characters
 
119
    $cgi->{nick} =~ s/[^A-Za-z0-9\[\]\{\}^\\\|\_\-\`]//g;
 
120
@@ -1083,6 +1081,11 @@
 
121
    if($cgi->{serv} =~ s/:(\d+)$//) {
 
122
       $cgi->{port} = $1;
 
123
    }
 
124
+   unless(access_configcheck('port', $cgi->{port})) {
 
125
+      message('access port denied', $cgi->{port});
 
126
+      $cgi->{port} = (split /,/, $config->{default_port})[0];
 
127
+   }
 
128
+   ($cgi->{port}) = $cgi->{port} =~ /(\d+)/;
 
129
    
 
130
    if(config_set('encoded_ip')) {
 
131
       $cgi->{name} = '[' .