aboutsummaryrefslogtreecommitdiff
path: root/src/Sockets.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Sockets.c')
-rw-r--r--src/Sockets.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Sockets.c b/src/Sockets.c
index 33401ee..7d6d709 100644
--- a/src/Sockets.c
+++ b/src/Sockets.c
@@ -158,6 +158,15 @@ int HTTP_SetupServer(int port, int queue_size, int hunt)
httpport = hunt ? realport : (unsigned long int) port;
printf("Server started on http://%s:%lu/\n", hostname, httpport);
+ if (CCTK_IsFunctionAliased("Send_Twitter_Msg"))
+ {
+ char msg[141];
+ char *this_user = getenv("USER");
+ if (!this_user) this_user = "unknown";
+ snprintf(msg, 140, "HTTPD by %s on http://%s:%lu/\n", this_user, hostname, httpport);
+ Send_Twitter_Msg(msg);
+ }
+ else printf("Not announcing location via Twitter.\n");
minsock = sock;
maxsock = sock;