From e440532c58d2f04ab6a487da08b2d6e9034eb831 Mon Sep 17 00:00:00 2001 From: Gabor Adam Toth Date: Wed, 24 Aug 2011 11:11:56 +0200 Subject: [PATCH] change load params for identica too --- world/net/identica/client.c | 4 ++-- world/net/twitter/client.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/world/net/identica/client.c b/world/net/identica/client.c index 11a118d..16e8d2b 100644 --- a/world/net/identica/client.c +++ b/world/net/identica/client.c @@ -9,7 +9,7 @@ inherit NET_PATH "twitter/client"; -object load(object usr, string key, string secret, string request, string access, string authorize) { +object load(object usr, mapping opts) { name = "identica"; display_name = "identi.ca"; api_base_url = "http://identi.ca/api"; @@ -20,5 +20,5 @@ object load(object usr, string key, string secret, string request, string access access_token_url = api_base_url + "/oauth/access_token"; authorize_url = api_base_url + "/oauth/authorize"; - return ::load(usr, key, secret, request, access, authorize); + return ::load(usr, opts); } diff --git a/world/net/twitter/client.c b/world/net/twitter/client.c index fd963a1..7024dbb 100644 --- a/world/net/twitter/client.c +++ b/world/net/twitter/client.c @@ -28,6 +28,8 @@ persistent mixed lastid; volatile string api_url = "https://api.twitter.com/1"; volatile string userstream_url = "https://userstream.twitter.com/2"; +volatile string name = "twitter"; +volatile string display_name = "twitter"; volatile int status_max_len = 140; volatile int send_to_user = 0; @@ -72,7 +74,7 @@ object load(object usr, mapping opts) { void check_status_update(string body, string headers, int http_status) { P3(("twitter/client:parse_status_update(%O, %O, %O)\n", body, headers, http_status)) if (http_status != R_OK) - sendmsg(user, "_failure_update_twitter", "Unable to post status update on twitter."); + sendmsg(user, "_failure_update_"+ name, "Unable to post status update on [_name].", (["_name": display_name])); } void status_update(string text) {