Skip to content
GitLab
Explore
Sign in
Commits on Source (2)
Added silent entry mode for webclient
· b3ccdf38
Isabel Jenkins
authored
Jun 21, 2017
b3ccdf38
Updated mwpoll for quiet exit as well as entry
· a6ef8ff6
Isabel Jenkins
authored
Jun 22, 2017
a6ef8ff6
Hide whitespace changes
Inline
Side-by-side
src/webclient/mwpoll.c
View file @
a6ef8ff6
...
...
@@ -54,6 +54,7 @@ static void usage(const char *name)
printf
(
"-c channel Initial channel to join
\n
"
);
printf
(
"-d Debug (foreground) mode
\n
"
);
printf
(
"-s Session mode for sucssite
\n
"
);
printf
(
"-q Quiet entry
\n
"
);
printf
(
"-a Auto create user if required
\n
"
);
printf
(
"-h host:port Specify alternate server to connect to.
\n
"
);
}
...
...
@@ -64,6 +65,7 @@ int main(int argc, char ** argv)
int
channel
=
0
;
int
debug
=
0
;
int
dbsession
=
0
;
int
quietentry
=
0
;
int
autocreate
=
0
;
const
char
*
username
=
NULL
;
const
char
*
hostname
=
NULL
;
...
...
@@ -87,6 +89,9 @@ int main(int argc, char ** argv)
case
's'
:
dbsession
++
;
break
;
case
'q'
:
quietentry
++
;
break
;
case
'a'
:
autocreate
++
;
break
;
...
...
@@ -220,7 +225,9 @@ int main(int argc, char ** argv)
/* spock, announce us please... */
//broadcast_onoffcode(3, 0, user->name, NULL);
talk_rawbcast
(
"
\033
10%s has just joined web talker room %d"
,
me
.
record
.
name
,
me
.
record
.
room
);
if
(
!
quietentry
)
{
talk_rawbcast
(
"
\033
10%s has just joined web talker room %d"
,
me
.
record
.
name
,
me
.
record
.
room
);
}
broadcast_onoffcode
(
1
,
0
,
me
.
record
.
name
,
NULL
);
/* the main loop */
...
...
@@ -241,7 +248,9 @@ int main(int argc, char ** argv)
me
.
record
.
chatmode
=
cm_clear
(
&
me
,
CM_ONCHAT
);
update_user
(
user
);
talk_rawbcast
(
"
\033
11%s has just left the web talker"
,
me
.
record
.
name
);
if
(
!
quietentry
)
{
talk_rawbcast
(
"
\033
11%s has just left the web talker"
,
me
.
record
.
name
);
}
broadcast_onoffcode
(
0
,
0
,
me
.
record
.
name
,
NULL
);
#if 0
switch (die) {
...
...