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
3e62e525
Commit
3e62e525
authored
Oct 25, 2013
by
Vysheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge github.com:vysheng/tg
parents
9a494d8f
7064f514
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
362 additions
and
1 deletion
+362
-1
LICENSE.h
LICENSE.h
+339
-0
README.md
README.md
+5
-0
interface.c
interface.c
+9
-0
main.c
main.c
+7
-0
net.h
net.h
+2
-0
queries.c
queries.c
+0
-1
No files found.
LICENSE.h
0 → 100644
View file @
3e62e525
This diff is collapsed.
Click to expand it.
README.md
View file @
3e62e525
...
...
@@ -5,12 +5,17 @@ Command-line interface for [Telegram](http://telegram.org). Uses readline interf
### API, Protocol documentation
Documentation for Telegram API is available here: http://core.telegram.org/api
Documentation for MTproto protocol is available here: http://core.telegram.org/mtproto
### Installation
Just run
`make`
#### Requirements
Currently only Linux OS is supported. But if you manage to launch it on OS X or other UNIX, please let me know.
### Usage
./telegram -k <public-server-key>
...
...
interface.c
View file @
3e62e525
...
...
@@ -64,6 +64,7 @@ char *commands[] = {
"send_video"
,
"send_text"
,
"chat_info"
,
"show_license"
,
0
};
int
commands_flags
[]
=
{
...
...
@@ -77,6 +78,7 @@ int commands_flags[] = {
0732
,
0732
,
074
,
07
,
};
char
*
a
=
0
;
...
...
@@ -365,6 +367,13 @@ void interpreter (char *line UU) {
pop_color
();
print_end
();
printf
(
"
\033
[1K
\033
H"
);
}
else
if
(
!
memcmp
(
line
,
"show_license"
,
12
))
{
char
*
b
=
#include "LICENSE.h"
;
print_start
();
printf
(
"%s"
,
b
);
print_end
();
}
}
...
...
main.c
View file @
3e62e525
...
...
@@ -244,6 +244,13 @@ int main (int argc, char **argv) {
signal
(
SIGABRT
,
sig_handler
);
running_for_first_time
();
printf
(
"Telegram-client version "
TG_VERSION
", Copyright (C) 2013 Vitaly Valtman
\n
"
"Telegram-client comes with ABSOLUTELY NO WARRANTY; for details type `show_license'.
\n
"
"This is free software, and you are welcome to redistribute it
\n
"
"under certain conditions; type `show_license' for details.
\n
"
);
get_terminal_attributes
();
args_parse
(
argc
,
argv
);
...
...
net.h
View file @
3e62e525
...
...
@@ -27,6 +27,8 @@ struct dc;
#define TG_APP_HASH "36722c72256a24c1225de00eb6a1ca74"
#define TG_APP_ID 2899
#define TG_VERSION "0.01-beta"
#define ACK_TIMEOUT 60
#define MAX_DC_ID 10
...
...
queries.c
View file @
3e62e525
...
...
@@ -59,7 +59,6 @@ int alarm_query (struct query *q) {
if
(
verbosity
)
{
logprintf
(
"Alarm query %lld
\n
"
,
q
->
msg_id
);
}
tree_delete_query
(
queries_tree
,
q
);
q
->
ev
.
timeout
=
get_double_time
()
+
QUERY_TIMEOUT
;
insert_event_timer
(
&
q
->
ev
);
...
...
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