Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
09d89efd
Commit
09d89efd
authored
Oct 16, 2015
by
V V
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfixes
parent
4b4a2053
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
interface.c
interface.c
+7
-1
loop.c
loop.c
+7
-0
tgl
tgl
+1
-1
No files found.
interface.c
View file @
09d89efd
...
@@ -2564,6 +2564,9 @@ void print_channel_info_gw (struct tgl_state *TLSR, void *extra, int success, st
...
@@ -2564,6 +2564,9 @@ void print_channel_info_gw (struct tgl_state *TLSR, void *extra, int success, st
tgl_peer_t
*
U
=
(
void
*
)
C
;
tgl_peer_t
*
U
=
(
void
*
)
C
;
mpush_color
(
ev
,
COLOR_YELLOW
);
mpush_color
(
ev
,
COLOR_YELLOW
);
mprintf
(
ev
,
"Channel "
);
mprintf
(
ev
,
"Channel "
);
if
(
U
->
flags
&
TGLCHF_OFFICIAL
)
{
mprintf
(
ev
,
"(official) "
);
}
print_channel_name
(
ev
,
U
->
id
,
U
);
print_channel_name
(
ev
,
U
->
id
,
U
);
if
(
C
->
username
)
{
if
(
C
->
username
)
{
mprintf
(
ev
,
" @%s"
,
C
->
username
);
mprintf
(
ev
,
" @%s"
,
C
->
username
);
...
@@ -3234,6 +3237,7 @@ void user_status_upd (struct tgl_state *TLS, struct tgl_user *U) {
...
@@ -3234,6 +3237,7 @@ void user_status_upd (struct tgl_state *TLS, struct tgl_user *U) {
}
}
void
on_login
(
struct
tgl_state
*
TLS
);
void
on_login
(
struct
tgl_state
*
TLS
);
void
on_failed_login
(
struct
tgl_state
*
TLS
);
void
on_started
(
struct
tgl_state
*
TLS
);
void
on_started
(
struct
tgl_state
*
TLS
);
void
do_get_values
(
struct
tgl_state
*
TLS
,
enum
tgl_value_type
type
,
const
char
*
prompt
,
int
num_values
,
void
do_get_values
(
struct
tgl_state
*
TLS
,
enum
tgl_value_type
type
,
const
char
*
prompt
,
int
num_values
,
void
(
*
callback
)(
struct
tgl_state
*
TLS
,
const
char
*
string
[],
void
*
arg
),
void
*
arg
);
void
(
*
callback
)(
struct
tgl_state
*
TLS
,
const
char
*
string
[],
void
*
arg
),
void
*
arg
);
...
@@ -3257,7 +3261,8 @@ struct tgl_update_callback upd_cb = {
...
@@ -3257,7 +3261,8 @@ struct tgl_update_callback upd_cb = {
.
secret_chat_update
=
secret_chat_update_gw
,
.
secret_chat_update
=
secret_chat_update_gw
,
.
msg_receive
=
print_message_gw
,
.
msg_receive
=
print_message_gw
,
.
our_id
=
our_id_gw
,
.
our_id
=
our_id_gw
,
.
user_status_update
=
user_status_upd
.
user_status_update
=
user_status_upd
,
.
on_failed_login
=
on_failed_login
};
};
...
@@ -3520,6 +3525,7 @@ void interpreter_ex (char *line, void *ex) {
...
@@ -3520,6 +3525,7 @@ void interpreter_ex (char *line, void *ex) {
if
(
op
==
ca_string
||
op
==
ca_file_name
||
op
==
ca_command
)
{
if
(
op
==
ca_string
||
op
==
ca_file_name
||
op
==
ca_command
)
{
if
(
cur_token_end_str
||
cur_token_len
<
0
)
{
if
(
cur_token_end_str
||
cur_token_len
<
0
)
{
if
(
opt
)
{
if
(
opt
)
{
args
[
args_num
++
].
str
=
NULL
;
flags
++
;
flags
++
;
continue
;
continue
;
}
}
...
...
loop.c
View file @
09d89efd
...
@@ -755,6 +755,13 @@ void on_login (struct tgl_state *TLS) {
...
@@ -755,6 +755,13 @@ void on_login (struct tgl_state *TLS) {
write_auth_file
();
write_auth_file
();
}
}
void
on_failed_login
(
struct
tgl_state
*
TLS
)
{
logprintf
(
"login failed
\n
"
);
logprintf
(
"login error #%d: %s
\n
"
,
TLS
->
error_code
,
TLS
->
error
);
logprintf
(
"you can relogin by deleting auth file or running telegram-cli with '-q' flag
\n
"
);
exit
(
2
);
}
void
on_started
(
struct
tgl_state
*
TLS
);
void
on_started
(
struct
tgl_state
*
TLS
);
void
clist_cb
(
struct
tgl_state
*
TLSR
,
void
*
callback_extra
,
int
success
,
int
size
,
tgl_peer_id_t
peers
[],
tgl_message_id_t
*
last_msg_id
[],
int
unread_count
[])
{
void
clist_cb
(
struct
tgl_state
*
TLSR
,
void
*
callback_extra
,
int
success
,
int
size
,
tgl_peer_id_t
peers
[],
tgl_message_id_t
*
last_msg_id
[],
int
unread_count
[])
{
on_started
(
TLS
);
on_started
(
TLS
);
...
...
tgl
@
f9534a2a
Subproject commit
5b18232e9ba1ec696843710b851120a2653cc801
Subproject commit
f9534a2a09fe4c89c9fecfd412fd1bfd4bcda8d3
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment