summaryrefslogtreecommitdiff
path: root/network/sendxmpp/patches/02.patch
blob: 1c0dd70210594a40da9c998bf8912e57821acc17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
From 48f6fe83589b04b77dd4fe52b810f1415aa2835c Mon Sep 17 00:00:00 2001
From: Lubomir Host <lubomir.host@gmail.com>
Date: Tue, 7 Oct 2014 19:38:00 +0200
Subject: [PATCH] Add spaces after comma.

---
 sendxmpp | 78 ++++++++++++++++++++++++++++----------------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/sendxmpp b/sendxmpp
index 91ae1ef..74d95c0 100755
--- a/sendxmpp
+++ b/sendxmpp
@@ -102,7 +102,7 @@ sub main () { # {{{
 			$txt .= $_ while (<STDIN>);
 		}
 
-		xmpp_send ($cnx,$cmdline,$config,$txt);
+		xmpp_send ($cnx, $cmdline, $config, $txt);
 
     }
 	else {
@@ -115,7 +115,7 @@ sub main () { # {{{
 		# line by line...
 		while (<STDIN>) {
 			chomp;
-			xmpp_send ($cnx,$cmdline,$config,$_);
+			xmpp_send ($cnx, $cmdline, $config, $_);
 		}
 	}
 
@@ -141,7 +141,7 @@ sub read_config_file ($) { # {{{
     error_exit ("$cfg_file must not be accessible by others")
       if ($mode & 0077);
 
-    open (CFG,"<$cfg_file")
+    open (CFG, "<$cfg_file")
       or error_exit("cannot open $cfg_file for reading: $!");
 
     my %config;
@@ -193,7 +193,7 @@ sub read_config_file ($) { # {{{
       unless (scalar(%config));
 
 	  if ($DEBUG || $VERBOSE) {
-		  while (my ($key,$val) = each %config) {
+		  while (my ($key, $val) = each %config) {
 			  debug_print ("config: '$key' => '$val'");
 		  }
 	  }
@@ -309,7 +309,7 @@ sub parse_cmdline () { # {{{
 	);
 
    if ($DEBUG || $VERBOSE) {
-       while (my ($key,$val) = each %dict) {
+       while (my ($key, $val) = each %dict) {
 	   debug_print ("cmdline: '$key' => '$val'");
        }
    }
@@ -319,7 +319,7 @@ sub parse_cmdline () { # {{{
 
 #
 # xmpp_login: login to the xmpp (jabber) server
-# input: hostname,port,username,password,resource,tls,ssl,debug
+# input: hostname, port, username, password, resource, tls, ssl, debug
 # output: an XMPP connection object
 #
 sub xmpp_login ($$$$$$$$$$$$) { # {{{
@@ -374,7 +374,7 @@ sub xmpp_login ($$$$$$$$$$$$) { # {{{
 		error_exit ("Could not connect to server '$host': ".($cnx->GetErrorCode()||$@)) unless @res;
 	}
 
-    xmpp_check_result("Connect",\@res,$cnx);
+    xmpp_check_result("Connect", \@res, $cnx);
 
 	if ($comp) {
 		my $sid = $cnx->{SESSION}->{id};
@@ -385,7 +385,7 @@ sub xmpp_login ($$$$$$$$$$$$) { # {{{
 			  'username' => $user,
 			  'password' => $pw,
 			  'resource' => $res);
-    xmpp_check_result('AuthSend',\@res,$cnx);
+    xmpp_check_result('AuthSend', \@res, $cnx);
 
     return $cnx;
 } # }}}
@@ -426,20 +426,20 @@ sub xmpp_send ($$$$) { # {{{
 
 #
 # xmpp_send_raw_xml: send a raw XML packet
-# input: connection,packet
+# input: connection, packet
 #
 sub xmpp_send_raw_xml ($$) { # {{{
 
-    my ($cnx,$packet) = @_;
+    my ($cnx, $packet) = @_;
 
     # for some reason, Send does not return anything
     $cnx->Send($packet);
-    xmpp_check_result('Send',0,$cnx);
+    xmpp_check_result('Send', 0, $cnx);
 } # }}}
 
 #
 # xmpp_send_message: send a message to some xmpp user
-# input: connection,recipient,subject,msg
+# input: connection, recipient, subject, msg
 #
 sub xmpp_send_message ($$$$$$) { # {{{
 
@@ -452,16 +452,16 @@ sub xmpp_send_message ($$$$$$) { # {{{
 		'subject'	=> $subject,
 		'body'		=> $msg);
 
-    xmpp_check_result('MessageSend',0,$cnx);
+    xmpp_check_result('MessageSend', 0, $cnx);
 } # }}}
 
 #
 # xmpp_send_chatroom_message: send a message to a chatroom
-# input: connection,resource,subject,recipient,message
+# input: connection, resource, subject, recipient, message
 #
 sub xmpp_send_chatroom_message ($$$$$) { # {{{
 
-    my ($cnx,$resource,$subject,$rcpt,$msg) =  @_;
+    my ($cnx, $resource, $subject, $rcpt, $msg) =  @_;
 
     # set the presence
     my $pres = new Net::XMPP::Presence;
@@ -476,10 +476,10 @@ sub xmpp_send_chatroom_message ($$$$$) { # {{{
 			  type    => 'groupchat');
 
     $res = $cnx->Send($groupmsg);
-    xmpp_check_result ('Send',$res,$cnx);
+    xmpp_check_result ('Send', $res, $cnx);
 
     # leave the group
-    $pres->SetPresence (Type=>'unavailable',To=>$rcpt);
+    $pres->SetPresence (Type=>'unavailable', To=>$rcpt);
 } # }}}
 
 #
@@ -494,7 +494,7 @@ sub xmpp_logout($) { # {{{
 
     my $cnx = shift;
     $cnx->Disconnect();
-    xmpp_check_result ('Disconnect',0); # well, nothing to check, really
+    xmpp_check_result ('Disconnect', 0); # well, nothing to check, really
 } # }}}
 
 #
@@ -518,7 +518,7 @@ sub xmpp_check_result { # {{{
 	}
 	else {
 		my $errmsg = $cnx->GetErrorCode() || '?';
-		error_exit ("Error '$txt': " . join (': ',@$res) . "[$errmsg]", $cnx);
+		error_exit ("Error '$txt': " . join (': ', @$res) . "[$errmsg]", $cnx);
 	}
 } # }}}
 
@@ -547,7 +547,7 @@ sub debug_print { # {{{
 #
 sub error_exit { # {{{
 
-    my ($err,$cnx) = @_;
+    my ($err, $cnx) = @_;
     print STDERR "$err\n";
     xmpp_logout ($cnx)
 	if ($cnx);
@@ -594,15 +594,15 @@ unlike L<mail(1)>. Messages can be sent both to individual recipients and chatro
 
 =over
 
-=item B<-f>,B<--file> I<file>
+=item B<-f>, B<--file> I<file>
 
 Use I<file> configuration file instead of F<~/.sendxmpprc>
 
-=item B<-u>,B<--username> I<user>
+=item B<-u>, B<--username> I<user>
 
 Use I<user> instead of the one in the configuration file
 
-=item B<-p>,B<--password> I<password>
+=item B<-p>, B<--password> I<password>
 
 Use I<password> instead of the one in the configuration file
 
@@ -610,35 +610,35 @@ Use I<password> instead of the one in the configuration file
 
 Instead of specifying username or password, attempt to use system level SSO (e.g. kerberos) if supported.
 
-=item B<-j>,B<--jserver> I<server>
+=item B<-j>, B<--jserver> I<server>
 
 Use jabber I<server> instead of the one in the configuration file.
 
-=item B<-o>,B<--component> I<componentname>
+=item B<-o>, B<--component> I<componentname>
 
 Use componentname in connect call. Seems needed for Google talk.
 
-=item B<-r>,B<--resource> I<res>
+=item B<-r>, B<--resource> I<res>
 
 Use resource I<res> for the sender [default: 'sendxmpp']; when sending to a chatroom, this determines the 'alias'
 
-=item B<-t>,B<--tls>
+=item B<-t>, B<--tls>
 
 Connect securely, using TLS
 
-=item B<-e>,B<--ssl>
+=item B<-e>, B<--ssl>
 
 Connect securely, using SSL
 
-=item B<-n>,B<--no-tls-verify>
+=item B<-n>, B<--no-tls-verify>
 
 Deactivate the verification of SSL certificates. Better way is to use parameter B<--tls-ca-path> with the needed path to CA certificates.
 
-=item B<-a>,B<--tls-ca-path>
+=item B<-a>, B<--tls-ca-path>
 
 Path to your custom CA certificates, so you can verificate SSL certificates during connecting.
 
-=item B<-l>,B<--headline>
+=item B<-l>, B<--headline>
 
 Backward compatibility option. You should use B<--message-type=headline> instead. Send a headline type message (not stored in offline messages)
 
@@ -646,35 +646,35 @@ Backward compatibility option. You should use B<--message-type=headline> instead
 
 Set type of message. Supported types are: B<message chat headline>. Default message type is B<message>. Headline type message can be set also with B<--headline> option, see B<--headline>
 
-=item B<-c>,B<--chatroom>
+=item B<-c>, B<--chatroom>
 
 Send the message to a chatroom
 
-=item B<-s>,B<--subject> I<subject>
+=item B<-s>, B<--subject> I<subject>
 
 Set the subject for the message to I<subject> [default: '']; when sending to a chatroom, this will set the subject for the chatroom
 
-=item B<-m>,B<--message> I<message>
+=item B<-m>, B<--message> I<message>
 
 Read the message from I<message> (a file) instead of stdin
 
-=item B<-i>,B<--interactive>
+=item B<-i>, B<--interactive>
 
 Work in interactive mode, reading lines from stdin and sending the one-at-time
 
-=item B<-w>,B<--raw>
+=item B<-w>, B<--raw>
 
 Send raw XML message to jabber server
 
-=item B<-v>,B<--verbose>
+=item B<-v>, B<--verbose>
 
 Give verbose output about what is happening
 
-=item B<-h>,B<--help>,B<--usage>
+=item B<-h>, B<--help>, B<--usage>
 
 Show a 'Usage' message
 
-=item B<-d>,B<--debug>
+=item B<-d>, B<--debug>
 
 Show debugging info while running. B<WARNING>: This will include passwords etc. so be careful with the output! Specify multiple times to increase debug level.