api: add integer return code for functions hook_{signal|hsignal}_send
parent
a0bf3938f1
commit
437767c0ca
|
@ -13,6 +13,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
|||
|
||||
* core: display a warning in case of inconsistency between the options
|
||||
weechat.look.save_{config|layout}_on_exit
|
||||
* api: add integer return code for functions hook_{signal|hsignal}_send
|
||||
|
||||
== Version 0.4.3 (2014-02-09)
|
||||
|
||||
|
|
|
@ -8047,14 +8047,16 @@ hook = weechat.hook_signal("quit", "my_signal_cb", "")
|
|||
|
||||
==== weechat_hook_signal_send
|
||||
|
||||
_Updated in 0.4.4._
|
||||
|
||||
Send a signal.
|
||||
|
||||
Prototype:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
int weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
@ -8064,11 +8066,19 @@ Arguments:
|
|||
<<_weechat_hook_signal,weechat_hook_signal>>)
|
||||
* 'signal_data': data sent with signal
|
||||
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
int rc = weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -8076,10 +8086,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
rc = weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
|
||||
# example
|
||||
weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
----
|
||||
|
||||
[[signal_logger_backlog]]
|
||||
|
@ -8354,7 +8364,7 @@ hook = weechat.hook_hsignal("test", "my_hsignal_cb", "")
|
|||
|
||||
==== weechat_hook_hsignal_send
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, updated in 0.4.4._
|
||||
|
||||
Send a hsignal (signal with hashtable).
|
||||
|
||||
|
@ -8362,7 +8372,7 @@ Prototype:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
int weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
----
|
||||
|
||||
Arguments:
|
||||
|
@ -8370,10 +8380,19 @@ Arguments:
|
|||
* 'signal': signal to send
|
||||
* 'hashtable': hashtable
|
||||
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
C example:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int rc;
|
||||
struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
|
@ -8382,7 +8401,7 @@ struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
|||
if (hashtable)
|
||||
{
|
||||
weechat_hashtable_set (hashtable, "key", "value");
|
||||
weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
rc = weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
weechat_hashtable_free (hashtable);
|
||||
}
|
||||
----
|
||||
|
@ -8392,10 +8411,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
weechat.hook_hsignal_send(signal, hashtable)
|
||||
rc = weechat.hook_hsignal_send(signal, hashtable)
|
||||
|
||||
# example
|
||||
weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
rc = weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
----
|
||||
|
||||
[[hsignal_irc_redirect_command]]
|
||||
|
@ -11573,7 +11592,7 @@ bar_item = weechat.bar_item_search("myitem")
|
|||
|
||||
==== weechat_bar_item_new
|
||||
|
||||
_Updated in version 0.4.2._
|
||||
_Updated in 0.4.2._
|
||||
|
||||
Create a new bar item.
|
||||
|
||||
|
@ -12063,7 +12082,7 @@ This function is not available in scripting API.
|
|||
|
||||
==== weechat_network_connect_to
|
||||
|
||||
_Updated in version 0.4.3._
|
||||
_Updated in 0.4.3._
|
||||
|
||||
Establish a connection to a remote host.
|
||||
|
||||
|
|
|
@ -8177,14 +8177,16 @@ hook = weechat.hook_signal("quit", "my_signal_cb", "")
|
|||
|
||||
==== weechat_hook_signal_send
|
||||
|
||||
_Mis à jour dans la 0.4.4._
|
||||
|
||||
Envoyer un signal.
|
||||
|
||||
Prototype :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
int weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
@ -8194,11 +8196,19 @@ Paramètres :
|
|||
<<_weechat_hook_signal,weechat_hook_signal>>)
|
||||
* 'signal_data' : données envoyées avec le signal
|
||||
|
||||
Valeur de retour (_WeeChat ≥ 0.4.4)_ :
|
||||
|
||||
* code retour du dernier "callback" exécuté ('WEECHAT_RC_OK' si aucun "callback"
|
||||
n'a été exécuté) :
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
weechat_hook_signal_send ("mon_signal", WEECHAT_HOOK_SIGNAL_STRING, ma_chaine);
|
||||
int rc = weechat_hook_signal_send ("mon_signal", WEECHAT_HOOK_SIGNAL_STRING, ma_chaine);
|
||||
----
|
||||
|
||||
Script (Python) :
|
||||
|
@ -8206,10 +8216,10 @@ Script (Python) :
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
rc = weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
|
||||
# exemple
|
||||
weechat.hook_signal_send("mon_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, ma_chaine)
|
||||
rc = weechat.hook_signal_send("mon_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, ma_chaine)
|
||||
----
|
||||
|
||||
[[signal_logger_backlog]]
|
||||
|
@ -8493,7 +8503,7 @@ hook = weechat.hook_hsignal("test", "my_hsignal_cb", "")
|
|||
|
||||
==== weechat_hook_hsignal_send
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
_WeeChat ≥ 0.3.4, mis à jour dans la 0.4.4._
|
||||
|
||||
Envoyer un hsignal (signal avec table de hachage).
|
||||
|
||||
|
@ -8501,7 +8511,7 @@ Prototype :
|
|||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
int weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
----
|
||||
|
||||
Paramètres :
|
||||
|
@ -8509,10 +8519,19 @@ Paramètres :
|
|||
* 'signal' : signal à envoyer
|
||||
* 'hashtable' : table de hachage
|
||||
|
||||
Valeur de retour (_WeeChat ≥ 0.4.4)_ :
|
||||
|
||||
* code retour du dernier "callback" exécuté ('WEECHAT_RC_OK' si aucun "callback"
|
||||
n'a été exécuté) :
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
Exemple en C :
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int rc;
|
||||
struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
|
@ -8521,7 +8540,7 @@ struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
|||
if (hashtable)
|
||||
{
|
||||
weechat_hashtable_set (hashtable, "clé", "valeur");
|
||||
weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
rc = weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
weechat_hashtable_free (hashtable);
|
||||
}
|
||||
----
|
||||
|
@ -8531,10 +8550,10 @@ Script (Python) :
|
|||
[source,python]
|
||||
----
|
||||
# prototype
|
||||
weechat.hook_hsignal_send(signal, hashtable)
|
||||
rc = weechat.hook_hsignal_send(signal, hashtable)
|
||||
|
||||
# exemple
|
||||
weechat.hook_hsignal_send("my_hsignal", { "clé": "valeur" })
|
||||
rc = weechat.hook_hsignal_send("my_hsignal", { "clé": "valeur" })
|
||||
----
|
||||
|
||||
[[hsignal_irc_redirect_command]]
|
||||
|
@ -11786,7 +11805,7 @@ bar_item = weechat.bar_item_search("myitem")
|
|||
|
||||
==== weechat_bar_item_new
|
||||
|
||||
_Mis à jour dans la version 0.4.2._
|
||||
_Mis à jour dans la 0.4.2._
|
||||
|
||||
Créer un nouvel objet de barre.
|
||||
|
||||
|
@ -12289,7 +12308,7 @@ Cette fonction n'est pas disponible dans l'API script.
|
|||
|
||||
==== weechat_network_connect_to
|
||||
|
||||
_Mis à jour dans la version 0.4.3._
|
||||
_Mis à jour dans la 0.4.3._
|
||||
|
||||
Établir une connexion à une machine distante.
|
||||
|
||||
|
|
|
@ -8220,14 +8220,17 @@ hook = weechat.hook_signal("quit", "my_signal_cb", "")
|
|||
|
||||
==== weechat_hook_signal_send
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 0.4.4._
|
||||
|
||||
Invia un segnale.
|
||||
|
||||
Prototipo:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
int weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
@ -8237,11 +8240,21 @@ Argomenti:
|
|||
<<_weechat_hook_signal,weechat_hook_signal>>)
|
||||
* 'signal_data': dati inviati con il segnale
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
int rc = weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
----
|
||||
|
||||
Script (Python):
|
||||
|
@ -8249,10 +8262,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
rc = weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
|
||||
# esempio
|
||||
weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
----
|
||||
|
||||
[[signal_logger_backlog]]
|
||||
|
@ -8544,7 +8557,8 @@ hook = weechat.hook_hsignal("test", "my_hsignal_cb", "")
|
|||
|
||||
==== weechat_hook_hsignal_send
|
||||
|
||||
_WeeChat ≥ 0.3.4._
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat ≥ 0.3.4, updated in 0.4.4._
|
||||
|
||||
Invia un hsignal (segnale con tabella hash).
|
||||
|
||||
|
@ -8552,7 +8566,7 @@ Prototipo:
|
|||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
int weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
----
|
||||
|
||||
Argomenti:
|
||||
|
@ -8560,10 +8574,21 @@ Argomenti:
|
|||
* 'signal': segnale da inviare
|
||||
* 'hashtable': tabella hash
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
Esempio in C:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int rc;
|
||||
struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
|
@ -8572,7 +8597,7 @@ struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
|||
if (hashtable)
|
||||
{
|
||||
weechat_hashtable_set (hashtable, "key", "value");
|
||||
weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
rc = weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
weechat_hashtable_free (hashtable);
|
||||
}
|
||||
----
|
||||
|
@ -8582,10 +8607,10 @@ Script (Python):
|
|||
[source,python]
|
||||
----
|
||||
# prototipo
|
||||
weechat.hook_hsignal_send(signal, hashtable)
|
||||
rc = weechat.hook_hsignal_send(signal, hashtable)
|
||||
|
||||
# esempio
|
||||
weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
rc = weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
----
|
||||
|
||||
[[hsignal_irc_redirect_command]]
|
||||
|
@ -11840,7 +11865,7 @@ bar_item = weechat.bar_item_search("myitem")
|
|||
==== weechat_bar_item_new
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in version 0.4.2._
|
||||
_Updated in 0.4.2._
|
||||
|
||||
Crea un nuovo elemento barra.
|
||||
|
||||
|
@ -12349,7 +12374,7 @@ Questa funzione non è disponibile nelle API per lo scripting.
|
|||
==== weechat_network_connect_to
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in version 0.4.3._
|
||||
_Updated in 0.4.3._
|
||||
|
||||
Stabilisce una connessione con un host remoto.
|
||||
|
||||
|
|
|
@ -8042,14 +8042,17 @@ hook = weechat.hook_signal("quit", "my_signal_cb", "")
|
|||
|
||||
==== weechat_hook_signal_send
|
||||
|
||||
// TRANSLATION MISSING
|
||||
_Updated in 0.4.4._
|
||||
|
||||
シグナルを送信。
|
||||
|
||||
プロトタイプ:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
int weechat_hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
@ -8059,11 +8062,21 @@ void weechat_hook_signal_send (const char *signal, const char *type_data,
|
|||
(<<_weechat_hook_signal,weechat_hook_signal>> を参照)
|
||||
* 'signal_data': シグナルと一緒に送信するデータ
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
int rc = weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
||||
----
|
||||
|
||||
スクリプト (Python) での使用例:
|
||||
|
@ -8071,10 +8084,10 @@ weechat_hook_signal_send ("my_signal", WEECHAT_HOOK_SIGNAL_STRING, my_string);
|
|||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
rc = weechat.hook_signal_send(signal, type_data, signal_data)
|
||||
|
||||
# 例
|
||||
weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
rc = weechat.hook_signal_send("my_signal", weechat.WEECHAT_HOOK_SIGNAL_STRING, my_string)
|
||||
----
|
||||
|
||||
[[signal_logger_backlog]]
|
||||
|
@ -8349,7 +8362,8 @@ hook = weechat.hook_hsignal("test", "my_hsignal_cb", "")
|
|||
|
||||
==== weechat_hook_hsignal_send
|
||||
|
||||
_WeeChat バージョン 0.3.4 以上で利用可。_
|
||||
// TRANSLATION MISSING
|
||||
_WeeChat バージョン 0.3.4 以上で利用可。, updated in 0.4.4._
|
||||
|
||||
hsignal (ハッシュテーブルを持つシグナル) を送信。
|
||||
|
||||
|
@ -8357,7 +8371,7 @@ hsignal (ハッシュテーブルを持つシグナル) を送信。
|
|||
|
||||
[source,C]
|
||||
----
|
||||
void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
int weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtable);
|
||||
----
|
||||
|
||||
引数:
|
||||
|
@ -8365,10 +8379,21 @@ void weechat_hook_hsignal_send (const char *signal, struct t_hashtable *hashtabl
|
|||
* 'signal': 送信するシグナル
|
||||
* 'hashtable': ハッシュテーブル
|
||||
|
||||
// TRANSLATION MISSING
|
||||
Return value (_WeeChat ≥ 0.4.4)_:
|
||||
|
||||
// TRANSLATION MISSING
|
||||
* return code of last callback executed ('WEECHAT_RC_OK' if no callback was
|
||||
executed):
|
||||
** 'WEECHAT_RC_OK'
|
||||
** 'WEECHAT_RC_OK_EAT'
|
||||
** 'WEECHAT_RC_ERROR'
|
||||
|
||||
C 言語での使用例:
|
||||
|
||||
[source,C]
|
||||
----
|
||||
int rc;
|
||||
struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
|
@ -8377,7 +8402,7 @@ struct t_hashtable *hashtable = weechat_hashtable_new (8,
|
|||
if (hashtable)
|
||||
{
|
||||
weechat_hashtable_set (hashtable, "key", "value");
|
||||
weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
rc = weechat_hook_hsignal_send ("my_hsignal", hashtable);
|
||||
weechat_hashtable_free (hashtable);
|
||||
}
|
||||
----
|
||||
|
@ -8387,10 +8412,10 @@ if (hashtable)
|
|||
[source,python]
|
||||
----
|
||||
# プロトタイプ
|
||||
weechat.hook_hsignal_send(signal, hashtable)
|
||||
rc = weechat.hook_hsignal_send(signal, hashtable)
|
||||
|
||||
# 例
|
||||
weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
rc = weechat.hook_hsignal_send("my_hsignal", { "key": "value" })
|
||||
----
|
||||
|
||||
[[hsignal_irc_redirect_command]]
|
||||
|
|
|
@ -1476,8 +1476,8 @@ COMMAND_CALLBACK(debug)
|
|||
else
|
||||
log_printf ("Dump request for WeeChat core and plugins");
|
||||
weechat_log_use_time = 0;
|
||||
hook_signal_send ("debug_dump", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(argc > 2) ? argv_eol[2] : NULL);
|
||||
(void) hook_signal_send ("debug_dump", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(argc > 2) ? argv_eol[2] : NULL);
|
||||
weechat_log_use_time = 1;
|
||||
}
|
||||
else if (string_strcasecmp (argv[1], "buffer") == 0)
|
||||
|
@ -1521,7 +1521,7 @@ COMMAND_CALLBACK(debug)
|
|||
{
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, "Libs:");
|
||||
hook_signal_send ("debug_libs", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("debug_libs", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
else if (string_strcasecmp (argv[1], "memory") == 0)
|
||||
{
|
||||
|
@ -4565,7 +4565,7 @@ COMMAND_CALLBACK(quit)
|
|||
* send quit signal: some plugins like irc use this signal to disconnect
|
||||
* from servers
|
||||
*/
|
||||
hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, pos_args);
|
||||
(void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, pos_args);
|
||||
|
||||
/* force end of WeeChat main loop */
|
||||
weechat_quit = 1;
|
||||
|
@ -5650,8 +5650,8 @@ COMMAND_CALLBACK(upgrade)
|
|||
}
|
||||
|
||||
/* send "upgrade" signal to plugins */
|
||||
hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(quit) ? "quit" : NULL);
|
||||
(void) hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(quit) ? "quit" : NULL);
|
||||
|
||||
if (!upgrade_weechat_save ())
|
||||
{
|
||||
|
|
|
@ -930,7 +930,8 @@ config_day_change_timer_cb (void *data, int remaining_calls)
|
|||
|
||||
/* send signal "day_changed" */
|
||||
strftime (str_time, sizeof (str_time), "%Y-%m-%d", local_time);
|
||||
hook_signal_send ("day_changed", WEECHAT_HOOK_SIGNAL_STRING, str_time);
|
||||
(void) hook_signal_send ("day_changed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, str_time);
|
||||
}
|
||||
|
||||
config_day_change_old_day = new_mday;
|
||||
|
|
|
@ -2201,12 +2201,14 @@ hook_signal (struct t_weechat_plugin *plugin, const char *signal,
|
|||
* Sends a signal.
|
||||
*/
|
||||
|
||||
void
|
||||
int
|
||||
hook_signal_send (const char *signal, const char *type_data, void *signal_data)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
int rc;
|
||||
|
||||
rc = WEECHAT_RC_OK;
|
||||
|
||||
hook_exec_start ();
|
||||
|
||||
ptr_hook = weechat_hooks[HOOK_TYPE_SIGNAL];
|
||||
|
@ -2231,6 +2233,8 @@ hook_signal_send (const char *signal, const char *type_data, void *signal_data)
|
|||
}
|
||||
|
||||
hook_exec_end ();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2278,12 +2282,14 @@ hook_hsignal (struct t_weechat_plugin *plugin, const char *signal,
|
|||
* Sends a hsignal (signal with hashtable).
|
||||
*/
|
||||
|
||||
void
|
||||
int
|
||||
hook_hsignal_send (const char *signal, struct t_hashtable *hashtable)
|
||||
{
|
||||
struct t_hook *ptr_hook, *next_hook;
|
||||
int rc;
|
||||
|
||||
rc = WEECHAT_RC_OK;
|
||||
|
||||
hook_exec_start ();
|
||||
|
||||
ptr_hook = weechat_hooks[HOOK_TYPE_HSIGNAL];
|
||||
|
@ -2308,6 +2314,8 @@ hook_hsignal_send (const char *signal, struct t_hashtable *hashtable)
|
|||
}
|
||||
|
||||
hook_exec_end ();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -510,14 +510,14 @@ extern struct t_hook *hook_signal (struct t_weechat_plugin *plugin,
|
|||
const char *signal,
|
||||
t_hook_callback_signal *callback,
|
||||
void *callback_data);
|
||||
extern void hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
extern int hook_signal_send (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
extern struct t_hook *hook_hsignal (struct t_weechat_plugin *plugin,
|
||||
const char *signal,
|
||||
t_hook_callback_hsignal *callback,
|
||||
void *callback_data);
|
||||
extern void hook_hsignal_send (const char *signal,
|
||||
struct t_hashtable *hashtable);
|
||||
extern int hook_hsignal_send (const char *signal,
|
||||
struct t_hashtable *hashtable);
|
||||
extern struct t_hook *hook_config (struct t_weechat_plugin *plugin,
|
||||
const char *option,
|
||||
t_hook_callback_config *callback,
|
||||
|
|
|
@ -818,5 +818,5 @@ upgrade_weechat_end ()
|
|||
weechat_upgrading = 0;
|
||||
|
||||
/* send signal for end of /upgrade */
|
||||
hook_signal_send ("upgrade_ended", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("upgrade_ended", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
|
|
@ -1784,8 +1784,8 @@ gui_chat_draw_formatted_buffer (struct t_gui_window *window)
|
|||
if ((window->scroll->scrolling != old_scrolling)
|
||||
|| (window->scroll->lines_after != old_lines_after))
|
||||
{
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
}
|
||||
|
||||
/* cursor is below end line of chat window? */
|
||||
|
|
|
@ -408,8 +408,8 @@ gui_key_flush (int paste)
|
|||
|
||||
if (key_str[0])
|
||||
{
|
||||
hook_signal_send ("key_pressed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, key_str);
|
||||
(void) hook_signal_send ("key_pressed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, key_str);
|
||||
|
||||
if (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED)
|
||||
input_old = (gui_current_window->buffer->input_buffer) ?
|
||||
|
@ -518,7 +518,7 @@ gui_key_read_cb (void *data, int fd)
|
|||
{
|
||||
/* no data on stdin, terminal lost */
|
||||
log_printf (_("Terminal lost, exiting WeeChat..."));
|
||||
hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
weechat_quit = 1;
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
|
|
@ -255,7 +255,7 @@ gui_main_signal_sigquit ()
|
|||
{
|
||||
log_printf (_("Signal %s received, exiting WeeChat..."),
|
||||
"SIGQUIT");
|
||||
hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
weechat_quit = 1;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ gui_main_signal_sigterm ()
|
|||
{
|
||||
log_printf (_("Signal %s received, exiting WeeChat..."),
|
||||
"SIGTERM");
|
||||
hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
weechat_quit = 1;
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ gui_main_signal_sighup ()
|
|||
*/
|
||||
gui_reload_config = 1;
|
||||
|
||||
hook_signal_send ("signal_sighup", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("signal_sighup", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -481,8 +481,8 @@ gui_main_loop ()
|
|||
|
||||
if (gui_signal_sigwinch_received)
|
||||
{
|
||||
hook_signal_send ("signal_sigwinch",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("signal_sigwinch",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
gui_signal_sigwinch_received = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1313,8 +1313,8 @@ gui_window_switch_to_buffer (struct t_gui_window *window,
|
|||
|
||||
if (old_buffer != buffer)
|
||||
{
|
||||
hook_signal_send ("buffer_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1351,8 +1351,8 @@ gui_window_switch (struct t_gui_window *window)
|
|||
|
||||
gui_input_move_to_buffer (old_window->buffer, window->buffer);
|
||||
|
||||
hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1394,8 +1394,8 @@ gui_window_page_up (struct t_gui_window *window)
|
|||
snprintf (scroll, sizeof (scroll), "-%d",
|
||||
num_lines + 1);
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
}
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
|
@ -1451,8 +1451,8 @@ gui_window_page_down (struct t_gui_window *window)
|
|||
snprintf (scroll, sizeof (scroll), "+%d",
|
||||
num_lines + 1);
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
break;
|
||||
|
@ -1491,8 +1491,8 @@ gui_window_scroll_up (struct t_gui_window *window)
|
|||
snprintf (scroll, sizeof (scroll), "-%d",
|
||||
CONFIG_INTEGER(config_look_scroll_amount));
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
}
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
|
@ -1542,8 +1542,8 @@ gui_window_scroll_down (struct t_gui_window *window)
|
|||
snprintf (scroll, sizeof (scroll), "+%d",
|
||||
CONFIG_INTEGER(config_look_scroll_amount));
|
||||
gui_window_scroll (window, scroll);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
break;
|
||||
|
@ -1575,8 +1575,8 @@ gui_window_scroll_top (struct t_gui_window *window)
|
|||
{
|
||||
window->scroll->start_line = NULL;
|
||||
gui_buffer_ask_chat_refresh (window->buffer, 2);
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
}
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
|
@ -1615,8 +1615,8 @@ gui_window_scroll_bottom (struct t_gui_window *window)
|
|||
{
|
||||
gui_buffer_ask_chat_refresh (window->buffer, 2);
|
||||
}
|
||||
hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_scrolled",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
break;
|
||||
case GUI_BUFFER_NUM_TYPES:
|
||||
break;
|
||||
|
|
|
@ -173,9 +173,9 @@ gui_buffer_local_var_add (struct t_gui_buffer *buffer, const char *name,
|
|||
|
||||
ptr_value = hashtable_get (buffer->local_variables, name);
|
||||
hashtable_set (buffer->local_variables, name, value);
|
||||
hook_signal_send ((ptr_value) ?
|
||||
"buffer_localvar_changed" : "buffer_localvar_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ((ptr_value) ?
|
||||
"buffer_localvar_changed" : "buffer_localvar_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -194,8 +194,8 @@ gui_buffer_local_var_remove (struct t_gui_buffer *buffer, const char *name)
|
|||
if (ptr_value)
|
||||
{
|
||||
hashtable_remove (buffer->local_variables, name);
|
||||
hook_signal_send ("buffer_localvar_removed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_localvar_removed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,8 +209,8 @@ gui_buffer_local_var_remove_all (struct t_gui_buffer *buffer)
|
|||
if (buffer && buffer->local_variables)
|
||||
{
|
||||
hashtable_remove_all (buffer->local_variables);
|
||||
hook_signal_send ("buffer_localvar_removed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_localvar_removed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -713,8 +713,8 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
|
|||
}
|
||||
else
|
||||
{
|
||||
hook_signal_send ("buffer_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
|
||||
(void) hook_signal_send ("buffer_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
|
||||
}
|
||||
|
||||
return new_buffer;
|
||||
|
@ -1125,8 +1125,8 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name)
|
|||
|
||||
gui_buffer_local_var_add (buffer, "name", name);
|
||||
|
||||
hook_signal_send ("buffer_renamed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_renamed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1149,8 +1149,8 @@ gui_buffer_set_short_name (struct t_gui_buffer *buffer, const char *short_name)
|
|||
buffer->mixed_lines->buffer_max_length_refresh = 1;
|
||||
gui_buffer_ask_chat_refresh (buffer, 1);
|
||||
|
||||
hook_signal_send ("buffer_renamed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_renamed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1168,8 +1168,8 @@ gui_buffer_set_type (struct t_gui_buffer *buffer, enum t_gui_buffer_type type)
|
|||
buffer->type = type;
|
||||
gui_buffer_ask_chat_refresh (buffer, 2);
|
||||
|
||||
hook_signal_send ("buffer_type_changed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_type_changed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1183,8 +1183,8 @@ gui_buffer_set_title (struct t_gui_buffer *buffer, const char *new_title)
|
|||
free (buffer->title);
|
||||
buffer->title = (new_title && new_title[0]) ? strdup (new_title) : NULL;
|
||||
|
||||
hook_signal_send ("buffer_title_changed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_title_changed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2401,8 +2401,8 @@ gui_buffer_clear (struct t_gui_buffer *buffer)
|
|||
|
||||
gui_buffer_ask_chat_refresh (buffer, 2);
|
||||
|
||||
hook_signal_send ("buffer_cleared",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_cleared",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2435,8 +2435,8 @@ gui_buffer_close (struct t_gui_buffer *buffer)
|
|||
int index, i;
|
||||
struct t_gui_buffer_visited *ptr_buffer_visited;
|
||||
|
||||
hook_signal_send ("buffer_closing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_closing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
|
||||
if (buffer->close_callback)
|
||||
{
|
||||
|
@ -2624,8 +2624,8 @@ gui_buffer_close (struct t_gui_buffer *buffer)
|
|||
if (gui_buffers_count > 0)
|
||||
gui_buffers_count--;
|
||||
|
||||
hook_signal_send ("buffer_closed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_closed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
|
||||
free (buffer);
|
||||
}
|
||||
|
@ -2850,8 +2850,9 @@ gui_buffer_renumber (int number1, int number2, int start_number)
|
|||
}
|
||||
if (ptr_buffer_moved)
|
||||
{
|
||||
hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ptr_buffer_moved);
|
||||
(void) hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
ptr_buffer_moved);
|
||||
}
|
||||
ptr_buffer = ptr_buffer2;
|
||||
if (ptr_buffer == ptr_last_buffer)
|
||||
|
@ -2982,8 +2983,8 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
|
|||
last_gui_buffer = ptr_last_buffer;
|
||||
}
|
||||
|
||||
hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3074,10 +3075,10 @@ gui_buffer_swap (int number1, int number2)
|
|||
}
|
||||
|
||||
/* send signals */
|
||||
hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[0]);
|
||||
hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[1]);
|
||||
(void) hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[0]);
|
||||
(void) hook_signal_send ("buffer_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ptr_first_buffer[1]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3178,8 +3179,8 @@ gui_buffer_merge (struct t_gui_buffer *buffer,
|
|||
|
||||
gui_window_ask_refresh (1);
|
||||
|
||||
hook_signal_send ("buffer_merged",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_merged",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3307,8 +3308,8 @@ gui_buffer_unmerge (struct t_gui_buffer *buffer, int number)
|
|||
|
||||
gui_window_ask_refresh (1);
|
||||
|
||||
hook_signal_send ("buffer_unmerged",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_unmerged",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -209,8 +209,8 @@ gui_completion_stop (struct t_gui_completion *completion)
|
|||
if (completion->partial_completion_list)
|
||||
{
|
||||
gui_completion_partial_list_free_all (completion);
|
||||
hook_signal_send ("partial_completion",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("partial_completion",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1052,8 +1052,8 @@ gui_completion_complete (struct t_gui_completion *completion)
|
|||
*/
|
||||
gui_completion_partial_build_list (completion,
|
||||
common_prefix_size);
|
||||
hook_signal_send ("partial_completion",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("partial_completion",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -154,8 +154,8 @@ gui_filter_buffer (struct t_gui_buffer *buffer,
|
|||
if (buffer->lines->lines_hidden != lines_hidden)
|
||||
{
|
||||
buffer->lines->lines_hidden = lines_hidden;
|
||||
hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
if (lines_changed)
|
||||
|
@ -210,8 +210,8 @@ gui_filter_global_enable ()
|
|||
{
|
||||
gui_filters_enabled = 1;
|
||||
gui_filter_all_buffers ();
|
||||
hook_signal_send ("filters_enabled",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("filters_enabled",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -226,8 +226,8 @@ gui_filter_global_disable ()
|
|||
{
|
||||
gui_filters_enabled = 0;
|
||||
gui_filter_all_buffers ();
|
||||
hook_signal_send ("filters_disabled",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("filters_disabled",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -380,8 +380,8 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
|
|||
last_gui_filter = new_filter;
|
||||
new_filter->next_filter = NULL;
|
||||
|
||||
hook_signal_send ("filter_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_filter);
|
||||
(void) hook_signal_send ("filter_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_filter);
|
||||
}
|
||||
|
||||
return new_filter;
|
||||
|
@ -419,8 +419,8 @@ gui_filter_free (struct t_gui_filter *filter)
|
|||
{
|
||||
int i;
|
||||
|
||||
hook_signal_send ("filter_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, filter);
|
||||
(void) hook_signal_send ("filter_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, filter);
|
||||
|
||||
/* free data */
|
||||
if (filter->name)
|
||||
|
@ -464,7 +464,7 @@ gui_filter_free (struct t_gui_filter *filter)
|
|||
|
||||
free (filter);
|
||||
|
||||
hook_signal_send ("filter_removed", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("filter_removed", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -57,7 +57,8 @@ int gui_add_hotlist = 1; /* 0 is for temporarily disable */
|
|||
void
|
||||
gui_hotlist_changed_signal ()
|
||||
{
|
||||
hook_signal_send ("hotlist_changed", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("hotlist_changed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -123,7 +123,8 @@ gui_input_replace_input (struct t_gui_buffer *buffer, const char *new_input)
|
|||
void
|
||||
gui_input_paste_pending_signal ()
|
||||
{
|
||||
hook_signal_send ("input_paste_pending", WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) hook_signal_send ("input_paste_pending",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -166,7 +167,8 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
|
|||
gui_completion_stop (buffer->completion);
|
||||
|
||||
/* send signal */
|
||||
hook_signal_send ("input_text_changed", WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("input_text_changed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -176,8 +178,8 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
|
|||
void
|
||||
gui_input_text_cursor_moved_signal (struct t_gui_buffer *buffer)
|
||||
{
|
||||
hook_signal_send ("input_text_cursor_moved", WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
buffer);
|
||||
(void) hook_signal_send ("input_text_cursor_moved",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -187,7 +189,8 @@ gui_input_text_cursor_moved_signal (struct t_gui_buffer *buffer)
|
|||
void
|
||||
gui_input_search_signal (struct t_gui_buffer *buffer)
|
||||
{
|
||||
hook_signal_send ("input_search", WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("input_search",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1650,8 +1653,9 @@ gui_input_zoom_merged_buffer (struct t_gui_buffer *buffer)
|
|||
|
||||
gui_buffer_ask_chat_refresh (buffer, 2);
|
||||
|
||||
hook_signal_send ((buffer_was_zoomed) ? "buffer_unzoomed" : "buffer_zoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ((buffer_was_zoomed) ?
|
||||
"buffer_unzoomed" : "buffer_zoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -666,8 +666,8 @@ gui_key_new (struct t_gui_buffer *buffer, int context, const char *key,
|
|||
|
||||
expanded_name = gui_key_get_expanded_name (new_key->key);
|
||||
|
||||
hook_signal_send ("key_bind",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, expanded_name);
|
||||
(void) hook_signal_send ("key_bind",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, expanded_name);
|
||||
|
||||
if (gui_key_verbose)
|
||||
{
|
||||
|
@ -886,8 +886,8 @@ gui_key_unbind (struct t_gui_buffer *buffer, int context, const char *key)
|
|||
gui_key_free (&gui_keys[context], &last_gui_key[context],
|
||||
&gui_keys_count[context], ptr_key);
|
||||
}
|
||||
hook_signal_send ("key_unbind",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, (char *)key);
|
||||
(void) hook_signal_send ("key_unbind",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, (char *)key);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ gui_key_focus_command (const char *key, int context,
|
|||
_("Sending hsignal: \"%s\""),
|
||||
commands[i] + 8);
|
||||
}
|
||||
hook_hsignal_send (commands[i] + 8, hashtable);
|
||||
(void) hook_hsignal_send (commands[i] + 8, hashtable);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1246,9 +1246,9 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
|||
message_for_signal = gui_chat_build_string_prefix_message (new_line);
|
||||
if (message_for_signal)
|
||||
{
|
||||
hook_signal_send ("weechat_highlight",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message_for_signal);
|
||||
(void) hook_signal_send ("weechat_highlight",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message_for_signal);
|
||||
free (message_for_signal);
|
||||
}
|
||||
}
|
||||
|
@ -1260,9 +1260,9 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
|||
message_for_signal = gui_chat_build_string_prefix_message (new_line);
|
||||
if (message_for_signal)
|
||||
{
|
||||
hook_signal_send ("weechat_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message_for_signal);
|
||||
(void) hook_signal_send ("weechat_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message_for_signal);
|
||||
free (message_for_signal);
|
||||
}
|
||||
}
|
||||
|
@ -1275,8 +1275,8 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
|||
buffer->own_lines->lines_hidden++;
|
||||
if (buffer->mixed_lines)
|
||||
buffer->mixed_lines->lines_hidden++;
|
||||
hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
/* add mixed line, if buffer is attached to at least one other buffer */
|
||||
|
@ -1303,8 +1303,8 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
|||
}
|
||||
}
|
||||
|
||||
hook_signal_send ("buffer_line_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_line);
|
||||
(void) hook_signal_send ("buffer_line_added",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_line);
|
||||
|
||||
return new_line;
|
||||
}
|
||||
|
@ -1408,8 +1408,8 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message)
|
|||
if (!ptr_line->data->displayed)
|
||||
{
|
||||
buffer->own_lines->lines_hidden++;
|
||||
hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) hook_signal_send ("buffer_lines_hidden",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
|
||||
ptr_line->data->refresh_needed = 1;
|
||||
|
|
|
@ -72,14 +72,15 @@ gui_nicklist_send_signal (const char *signal, struct t_gui_buffer *buffer,
|
|||
"0x%lx,%s",
|
||||
(long unsigned int)(buffer),
|
||||
(arguments) ? arguments : "");
|
||||
hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_STRING, str_args);
|
||||
(void) hook_signal_send (signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING, str_args);
|
||||
free (str_args);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(char *)arguments);
|
||||
(void) hook_signal_send (signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING, (char *)arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +115,7 @@ gui_nicklist_send_hsignal (const char *signal, struct t_gui_buffer *buffer,
|
|||
if (nick)
|
||||
hashtable_set (gui_nicklist_hsignal, "nick", nick);
|
||||
|
||||
hook_hsignal_send (signal, gui_nicklist_hsignal);
|
||||
(void) hook_hsignal_send (signal, gui_nicklist_hsignal);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -662,8 +662,8 @@ gui_window_new (struct t_gui_window *parent_window, struct t_gui_buffer *buffer,
|
|||
}
|
||||
|
||||
/* send signal */
|
||||
hook_signal_send ("window_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_window);
|
||||
(void) hook_signal_send ("window_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_window);
|
||||
|
||||
return new_window;
|
||||
}
|
||||
|
@ -943,7 +943,8 @@ gui_window_free (struct t_gui_window *window)
|
|||
|
||||
old_current_window = gui_current_window;
|
||||
|
||||
hook_signal_send ("window_closing", WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_closing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
|
||||
if (window->buffer)
|
||||
gui_buffer_add_value_num_displayed (window->buffer, -1);
|
||||
|
@ -994,14 +995,16 @@ gui_window_free (struct t_gui_window *window)
|
|||
i++;
|
||||
}
|
||||
|
||||
hook_signal_send ("window_closed", WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
(void) hook_signal_send ("window_closed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, window);
|
||||
|
||||
free (window);
|
||||
|
||||
if (gui_current_window != old_current_window)
|
||||
{
|
||||
hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_switch",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
gui_current_window);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1657,13 +1660,15 @@ gui_window_zoom (struct t_gui_window *window)
|
|||
if (ptr_layout)
|
||||
{
|
||||
/* restore layout as it was before zooming a window */
|
||||
hook_signal_send ("window_unzoom",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_unzoom",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
gui_current_window);
|
||||
gui_layout_window_apply (ptr_layout,
|
||||
ptr_layout->internal_id_current_window);
|
||||
gui_layout_remove (ptr_layout);
|
||||
hook_signal_send ("window_unzoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_unzoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
gui_current_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1672,12 +1677,14 @@ gui_window_zoom (struct t_gui_window *window)
|
|||
if (ptr_layout)
|
||||
{
|
||||
gui_layout_add (ptr_layout);
|
||||
hook_signal_send ("window_zoom",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_zoom",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
gui_current_window);
|
||||
gui_layout_window_store (ptr_layout);
|
||||
gui_window_merge_all (window);
|
||||
hook_signal_send ("window_zoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, gui_current_window);
|
||||
(void) hook_signal_send ("window_zoomed",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
gui_current_window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -912,8 +912,8 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
|
|||
&& (strcmp (old_suggestions, ptr_suggestions) != 0)))
|
||||
{
|
||||
weechat_bar_item_update ("aspell_suggest");
|
||||
weechat_hook_signal_send ("aspell_suggest",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
(void) weechat_hook_signal_send ("aspell_suggest",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
|
||||
}
|
||||
if (old_suggestions)
|
||||
free (old_suggestions);
|
||||
|
|
|
@ -2436,44 +2436,44 @@ weechat_guile_api_hook_signal (SCM signal, SCM function, SCM data)
|
|||
|
||||
SCM
|
||||
weechat_guile_api_hook_signal_send (SCM signal, SCM type_data,
|
||||
SCM signal_data)
|
||||
SCM signal_data)
|
||||
{
|
||||
int number;
|
||||
int number, rc;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (!scm_is_string (signal) || !scm_is_string (type_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
if (strcmp (API_SCM_TO_STRING(type_data), WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
if (!scm_is_string (signal_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
(void *)API_SCM_TO_STRING(signal_data));
|
||||
API_RETURN_OK;
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
rc = weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
(void *)API_SCM_TO_STRING(signal_data));
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (API_SCM_TO_STRING(type_data), WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
if (!scm_is_integer (signal_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
number = scm_to_int (signal_data);
|
||||
weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
&number);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
&number);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (API_SCM_TO_STRING(type_data), WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
if (!scm_is_string (signal_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
API_STR2PTR(API_SCM_TO_STRING(signal_data)));
|
||||
API_RETURN_OK;
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
rc = weechat_hook_signal_send (API_SCM_TO_STRING(signal),
|
||||
API_SCM_TO_STRING(type_data),
|
||||
API_STR2PTR(API_SCM_TO_STRING(signal_data)));
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -2537,22 +2537,23 @@ SCM
|
|||
weechat_guile_api_hook_hsignal_send (SCM signal, SCM hashtable)
|
||||
{
|
||||
struct t_hashtable *c_hashtable;
|
||||
int rc;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (!scm_is_string (signal) || !scm_list_p (hashtable))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
c_hashtable = weechat_guile_alist_to_hashtable (hashtable,
|
||||
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (API_SCM_TO_STRING(signal), c_hashtable);
|
||||
rc = weechat_hook_hsignal_send (API_SCM_TO_STRING(signal), c_hashtable);
|
||||
|
||||
if (c_hashtable)
|
||||
weechat_hashtable_free (c_hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -436,8 +436,9 @@ weechat_guile_load (const char *filename)
|
|||
&weechat_guile_api_buffer_input_data_cb,
|
||||
&weechat_guile_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("guile_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
guile_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("guile_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
guile_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -494,8 +495,8 @@ weechat_guile_unload (struct t_plugin_script *script)
|
|||
if (interpreter)
|
||||
weechat_guile_catch (scm_gc_unprotect_object, interpreter);
|
||||
|
||||
weechat_hook_signal_send ("guile_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("guile_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -236,8 +236,9 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
|
|||
weechat_buffer_set (new_buffer, "localvar_set_channel", channel_name);
|
||||
if (server->is_away && server->away_message)
|
||||
weechat_buffer_set (new_buffer, "localvar_set_away", server->away_message);
|
||||
weechat_hook_signal_send ("logger_backlog",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
|
||||
(void) weechat_hook_signal_send ("logger_backlog",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
new_buffer);
|
||||
if (weechat_config_boolean (irc_config_network_send_unknown_commands))
|
||||
weechat_buffer_set (new_buffer, "input_get_unknown_commands", "1");
|
||||
if (channel_type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
|
@ -350,9 +351,9 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
|
|||
free (channel_name_lower);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ((channel_type == IRC_CHANNEL_TYPE_CHANNEL) ?
|
||||
"irc_channel_opened" : "irc_pv_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
|
||||
(void) weechat_hook_signal_send ((channel_type == IRC_CHANNEL_TYPE_CHANNEL) ?
|
||||
"irc_channel_opened" : "irc_pv_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, new_buffer);
|
||||
|
||||
/* all is OK, return address of new channel */
|
||||
return new_channel;
|
||||
|
|
|
@ -1434,9 +1434,9 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
|
|||
weechat_infolist_new_var_string (item, "filename", argv_eol[3]);
|
||||
weechat_infolist_new_var_string (item, "local_address", str_address);
|
||||
weechat_infolist_new_var_integer (item, "socket", ptr_server->sock);
|
||||
weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
@ -1463,9 +1463,9 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
|
|||
"irc.%s.%s", ptr_server->name, argv[2]);
|
||||
weechat_infolist_new_var_string (item, "charset_modifier", charset_modifier);
|
||||
weechat_infolist_new_var_string (item, "local_address", str_address);
|
||||
weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
|
|
@ -629,16 +629,16 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick,
|
|||
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PROXY));
|
||||
weechat_infolist_new_var_string (item, "remote_address", pos_addr);
|
||||
weechat_infolist_new_var_integer (item, "port", atoi (pos_port));
|
||||
weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
|
||||
if (filename)
|
||||
free (filename);
|
||||
|
@ -726,16 +726,16 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick,
|
|||
(filename) ? filename : pos_file);
|
||||
weechat_infolist_new_var_integer (item, "port", atoi (pos_port));
|
||||
weechat_infolist_new_var_string (item, "start_resume", pos_start_resume);
|
||||
weechat_hook_signal_send ("xfer_accept_resume",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_accept_resume",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
|
||||
if (filename)
|
||||
free (filename);
|
||||
|
@ -823,16 +823,16 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick,
|
|||
(filename) ? filename : pos_file);
|
||||
weechat_infolist_new_var_integer (item, "port", atoi (pos_port));
|
||||
weechat_infolist_new_var_string (item, "start_resume", pos_start_resume);
|
||||
weechat_hook_signal_send ("xfer_start_resume",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_start_resume",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
|
||||
if (filename)
|
||||
free (filename);
|
||||
|
@ -935,16 +935,16 @@ irc_ctcp_recv_dcc (struct t_irc_server *server, const char *nick,
|
|||
IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PROXY));
|
||||
weechat_infolist_new_var_string (item, "remote_address", pos_addr);
|
||||
weechat_infolist_new_var_integer (item, "port", atoi (pos_port));
|
||||
weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send ("xfer_add",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_dcc",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
|
||||
free (dcc_args);
|
||||
}
|
||||
|
@ -1053,9 +1053,9 @@ irc_ctcp_recv (struct t_irc_server *server, time_t date, const char *command,
|
|||
(pos_args) ? IRC_COLOR_RESET : "",
|
||||
(pos_args) ? " " : "",
|
||||
(pos_args) ? pos_args : "");
|
||||
weechat_hook_signal_send ("irc_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1126,9 +1126,9 @@ irc_ctcp_recv (struct t_irc_server *server, time_t date, const char *command,
|
|||
}
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_ctcp",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
(void) weechat_hook_signal_send ("irc_ctcp",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
message);
|
||||
|
||||
if (pos_space)
|
||||
pos_space[0] = ' ';
|
||||
|
|
|
@ -253,8 +253,8 @@ irc_ignore_free (struct t_irc_ignore *ignore)
|
|||
{
|
||||
struct t_irc_ignore *ptr_ignore;
|
||||
|
||||
weechat_hook_signal_send ("irc_ignore_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ignore);
|
||||
(void) weechat_hook_signal_send ("irc_ignore_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, ignore);
|
||||
|
||||
/* decrement number for all ignore after this one */
|
||||
for (ptr_ignore = ignore->next_ignore; ptr_ignore;
|
||||
|
@ -288,8 +288,8 @@ irc_ignore_free (struct t_irc_ignore *ignore)
|
|||
|
||||
free (ignore);
|
||||
|
||||
weechat_hook_signal_send ("irc_ignore_removed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) weechat_hook_signal_send ("irc_ignore_removed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -434,8 +434,8 @@ void
|
|||
irc_notify_free (struct t_irc_server *server, struct t_irc_notify *notify,
|
||||
int remove_monitor)
|
||||
{
|
||||
weechat_hook_signal_send ("irc_notify_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, notify);
|
||||
(void) weechat_hook_signal_send ("irc_notify_removing",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, notify);
|
||||
|
||||
/* free data */
|
||||
if (notify->nick)
|
||||
|
@ -468,8 +468,8 @@ irc_notify_free (struct t_irc_server *server, struct t_irc_notify *notify,
|
|||
if (server->notify_count > 0)
|
||||
server->notify_count--;
|
||||
|
||||
weechat_hook_signal_send ("irc_notify_removed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
(void) weechat_hook_signal_send ("irc_notify_removed",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -650,7 +650,7 @@ irc_notify_send_signal (struct t_irc_notify *notify,
|
|||
(away_message && away_message[0]) ? away_message : "");
|
||||
}
|
||||
|
||||
weechat_hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_STRING, data);
|
||||
(void) weechat_hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_STRING, data);
|
||||
|
||||
if (data)
|
||||
free (data);
|
||||
|
|
|
@ -1764,9 +1764,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
|
|||
if (ptr_channel->has_quit_server)
|
||||
ptr_channel->has_quit_server = 0;
|
||||
|
||||
weechat_hook_signal_send ("irc_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
argv_eol[0]);
|
||||
(void) weechat_hook_signal_send ("irc_pv",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
argv_eol[0]);
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
|
@ -2183,8 +2183,8 @@ IRC_PROTOCOL_CALLBACK(001)
|
|||
}
|
||||
|
||||
/* send signal "irc_server_connected" with server name */
|
||||
weechat_hook_signal_send ("irc_server_connected",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
(void) weechat_hook_signal_send ("irc_server_connected",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
|
||||
/* execute command when connected */
|
||||
server_command = weechat_string_eval_expression (IRC_SERVER_OPTION_STRING(server,
|
||||
|
|
|
@ -748,7 +748,7 @@ irc_redirect_stop (struct t_irc_redirect *redirect, const char *error)
|
|||
|
||||
snprintf (signal_name, sizeof (signal_name), "irc_redirection_%s_%s",
|
||||
redirect->signal, redirect->pattern);
|
||||
weechat_hook_hsignal_send (signal_name, hashtable);
|
||||
(void) weechat_hook_hsignal_send (signal_name, hashtable);
|
||||
|
||||
if (hashtable)
|
||||
weechat_hashtable_free (hashtable);
|
||||
|
|
|
@ -1725,16 +1725,17 @@ irc_server_send_signal (struct t_irc_server *server, const char *signal,
|
|||
{
|
||||
snprintf (full_message_tags, length,
|
||||
"%s;%s", tags, full_message);
|
||||
weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(void *)full_message_tags);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(void *)full_message_tags);
|
||||
free (full_message_tags);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(void *)full_message);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(void *)full_message);
|
||||
}
|
||||
free (str_signal);
|
||||
}
|
||||
|
@ -3502,8 +3503,9 @@ irc_server_create_buffer (struct t_irc_server *server)
|
|||
weechat_buffer_set (server->buffer, "localvar_set_charset_modifier",
|
||||
charset_modifier);
|
||||
|
||||
weechat_hook_signal_send ("logger_backlog",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, server->buffer);
|
||||
(void) weechat_hook_signal_send ("logger_backlog",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
server->buffer);
|
||||
|
||||
if (weechat_config_boolean (irc_config_network_send_unknown_commands))
|
||||
weechat_buffer_set (server->buffer, "input_get_unknown_commands", "1");
|
||||
|
@ -3531,8 +3533,9 @@ irc_server_create_buffer (struct t_irc_server *server)
|
|||
weechat_buffer_merge (server->buffer, ptr_buffer_for_merge);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_server_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER, server->buffer);
|
||||
(void) weechat_hook_signal_send ("irc_server_opened",
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
server->buffer);
|
||||
|
||||
return server->buffer;
|
||||
}
|
||||
|
@ -4162,8 +4165,8 @@ irc_server_connect (struct t_irc_server *server)
|
|||
#endif
|
||||
|
||||
/* send signal "irc_server_connecting" with server name */
|
||||
weechat_hook_signal_send ("irc_server_connecting",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
(void) weechat_hook_signal_send ("irc_server_connecting",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -4299,8 +4302,8 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
|
|||
server->disconnected = 1;
|
||||
|
||||
/* send signal "irc_server_disconnected" with server name */
|
||||
weechat_hook_signal_send ("irc_server_disconnected",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
(void) weechat_hook_signal_send ("irc_server_disconnected",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, server->name);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2643,13 +2643,13 @@ static int
|
|||
weechat_lua_api_hook_signal_send (lua_State *L)
|
||||
{
|
||||
const char *signal, *type_data, *signal_data;
|
||||
int number;
|
||||
int number, rc;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
signal_data = NULL;
|
||||
|
||||
if (lua_gettop (L) < 3)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = lua_tostring (L, -3);
|
||||
type_data = lua_tostring (L, -2);
|
||||
|
@ -2657,24 +2657,24 @@ weechat_lua_api_hook_signal_send (lua_State *L)
|
|||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
signal_data = lua_tostring (L, -1);
|
||||
weechat_hook_signal_send (signal, type_data, (void *)signal_data);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data, (void *)signal_data);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
number = lua_tonumber (L, -1);
|
||||
weechat_hook_signal_send (signal, type_data, &number);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data, &number);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
signal_data = lua_tostring (L, -1);
|
||||
weechat_hook_signal_send (signal, type_data,
|
||||
API_STR2PTR(signal_data));
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data,
|
||||
API_STR2PTR(signal_data));
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -2742,10 +2742,11 @@ weechat_lua_api_hook_hsignal_send (lua_State *L)
|
|||
{
|
||||
const char *signal;
|
||||
struct t_hashtable *hashtable;
|
||||
int rc;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (lua_gettop (L) < 2)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = lua_tostring (L, -2);
|
||||
hashtable = weechat_lua_tohashtable (L, -1,
|
||||
|
@ -2753,12 +2754,12 @@ weechat_lua_api_hook_hsignal_send (lua_State *L)
|
|||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (signal, hashtable);
|
||||
rc = weechat_hook_hsignal_send (signal, hashtable);
|
||||
|
||||
if (hashtable)
|
||||
weechat_hashtable_free (hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -455,8 +455,9 @@ weechat_lua_load (const char *filename)
|
|||
&weechat_lua_api_buffer_input_data_cb,
|
||||
&weechat_lua_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("lua_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
lua_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("lua_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
lua_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -514,8 +515,8 @@ weechat_lua_unload (struct t_plugin_script *script)
|
|||
if (interpreter)
|
||||
lua_close (interpreter);
|
||||
|
||||
weechat_hook_signal_send ("lua_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("lua_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -2474,39 +2474,39 @@ XS (XS_weechat_api_hook_signal)
|
|||
XS (XS_weechat_api_hook_signal_send)
|
||||
{
|
||||
char *signal, *type_data;
|
||||
int number;
|
||||
int number, rc;
|
||||
dXSARGS;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (items < 3)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = SvPV_nolen (ST (0));
|
||||
type_data = SvPV_nolen (ST (1));
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
SvPV_nolen (ST (2))); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
SvPV_nolen (ST (2))); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
number = SvIV(ST (2));
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
&number); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
&number); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
API_STR2PTR(SvPV_nolen (ST (2)))); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
API_STR2PTR(SvPV_nolen (ST (2)))); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -2572,11 +2572,12 @@ XS (XS_weechat_api_hook_hsignal_send)
|
|||
{
|
||||
char *signal;
|
||||
struct t_hashtable *hashtable;
|
||||
int rc;
|
||||
dXSARGS;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (items < 2)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = SvPV_nolen (ST (0));
|
||||
hashtable = weechat_perl_hash_to_hashtable (ST (1),
|
||||
|
@ -2584,12 +2585,12 @@ XS (XS_weechat_api_hook_hsignal_send)
|
|||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (signal, hashtable);
|
||||
rc = weechat_hook_hsignal_send (signal, hashtable);
|
||||
|
||||
if (hashtable)
|
||||
weechat_hashtable_free (hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -468,8 +468,9 @@ weechat_perl_load (const char *filename)
|
|||
&weechat_perl_api_buffer_input_data_cb,
|
||||
&weechat_perl_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("perl_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
perl_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("perl_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
perl_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -542,8 +543,8 @@ weechat_perl_unload (struct t_plugin_script *script)
|
|||
free (interpreter);
|
||||
#endif
|
||||
|
||||
weechat_hook_signal_send ("perl_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("perl_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -1088,8 +1088,8 @@ plugin_script_action_install (struct t_weechat_plugin *weechat_plugin,
|
|||
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_installed", weechat_plugin->name);
|
||||
weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
(void) weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
|
||||
free (*list);
|
||||
*list = NULL;
|
||||
|
@ -1148,8 +1148,8 @@ plugin_script_action_remove (struct t_weechat_plugin *weechat_plugin,
|
|||
|
||||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_removed", weechat_plugin->name);
|
||||
weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
(void) weechat_hook_signal_send (str_signal, WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ptr_list);
|
||||
|
||||
free (*list);
|
||||
*list = NULL;
|
||||
|
|
|
@ -862,8 +862,8 @@ plugin_load (const char *filename, int argc, char **argv)
|
|||
name);
|
||||
}
|
||||
|
||||
hook_signal_send ("plugin_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
(char *)filename);
|
||||
(void) hook_signal_send ("plugin_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, (char *)filename);
|
||||
|
||||
return new_plugin;
|
||||
}
|
||||
|
@ -1046,7 +1046,8 @@ plugin_unload (struct t_weechat_plugin *plugin)
|
|||
_("Plugin \"%s\" unloaded"),
|
||||
(name) ? name : "???");
|
||||
}
|
||||
hook_signal_send ("plugin_unloaded", WEECHAT_HOOK_SIGNAL_STRING, name);
|
||||
(void) hook_signal_send ("plugin_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, name);
|
||||
if (name)
|
||||
free (name);
|
||||
}
|
||||
|
|
|
@ -2584,38 +2584,38 @@ static PyObject *
|
|||
weechat_python_api_hook_signal_send (PyObject *self, PyObject *args)
|
||||
{
|
||||
char *signal, *type_data, *signal_data, *error;
|
||||
int number;
|
||||
int number, rc;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
signal = NULL;
|
||||
type_data = NULL;
|
||||
signal_data = NULL;
|
||||
if (!PyArg_ParseTuple (args, "sss", &signal, &type_data, &signal_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal, type_data, signal_data);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data, signal_data);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
error = NULL;
|
||||
number = (int)strtol (signal_data, &error, 10);
|
||||
if (error && !error[0])
|
||||
{
|
||||
weechat_hook_signal_send (signal, type_data, &number);
|
||||
}
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data, &number);
|
||||
else
|
||||
rc = WEECHAT_RC_ERROR;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal, type_data,
|
||||
API_STR2PTR(signal_data));
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal, type_data,
|
||||
API_STR2PTR(signal_data));
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -2687,24 +2687,25 @@ weechat_python_api_hook_hsignal_send (PyObject *self, PyObject *args)
|
|||
char *signal;
|
||||
struct t_hashtable *hashtable;
|
||||
PyObject *dict;
|
||||
int rc;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
signal = NULL;
|
||||
dict = NULL;
|
||||
if (!PyArg_ParseTuple (args, "sO", &signal, &dict))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
hashtable = weechat_python_dict_to_hashtable (dict,
|
||||
WEECHAT_SCRIPT_HASHTABLE_DEFAULT_SIZE,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (signal, hashtable);
|
||||
rc = weechat_hook_hsignal_send (signal, hashtable);
|
||||
|
||||
if (hashtable)
|
||||
weechat_hashtable_free (hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -766,8 +766,9 @@ weechat_python_load (const char *filename)
|
|||
&weechat_python_api_buffer_input_data_cb,
|
||||
&weechat_python_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("python_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
python_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("python_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
python_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -832,8 +833,8 @@ weechat_python_unload (struct t_plugin_script *script)
|
|||
if (old_interpreter)
|
||||
PyThreadState_Swap (old_interpreter);
|
||||
|
||||
weechat_hook_signal_send ("python_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("python_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -1146,9 +1146,8 @@ relay_irc_input_send (struct t_relay_client *client, const char *irc_channel,
|
|||
RELAY_PLUGIN_NAME, buf);
|
||||
}
|
||||
|
||||
weechat_hook_signal_send ("irc_input_send",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
buf);
|
||||
(void) weechat_hook_signal_send ("irc_input_send",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, buf);
|
||||
free (buf);
|
||||
}
|
||||
free (vbuffer);
|
||||
|
@ -1729,8 +1728,8 @@ relay_irc_recv (struct t_relay_client *client, const char *data)
|
|||
*/
|
||||
if (redirect_msg)
|
||||
{
|
||||
weechat_hook_hsignal_send ("irc_redirect_command",
|
||||
hash_redirect);
|
||||
(void) weechat_hook_hsignal_send ("irc_redirect_command",
|
||||
hash_redirect);
|
||||
}
|
||||
weechat_hashtable_free (hash_redirect);
|
||||
}
|
||||
|
|
|
@ -3011,11 +3011,11 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
|
|||
VALUE signal_data)
|
||||
{
|
||||
char *c_signal, *c_type_data, *c_signal_data;
|
||||
int number;
|
||||
int number, rc;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (NIL_P (signal) || NIL_P (type_data) || NIL_P (signal_data))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
Check_Type (signal, T_STRING);
|
||||
Check_Type (type_data, T_STRING);
|
||||
|
@ -3027,26 +3027,26 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
|
|||
{
|
||||
Check_Type (signal_data, T_STRING);
|
||||
c_signal_data = StringValuePtr (signal_data);
|
||||
weechat_hook_signal_send (c_signal, c_type_data, c_signal_data);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (c_signal, c_type_data, c_signal_data);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (c_type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
Check_Type (signal_data, T_FIXNUM);
|
||||
number = FIX2INT (signal_data);
|
||||
weechat_hook_signal_send (c_signal, c_type_data, &number);
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (c_signal, c_type_data, &number);
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (c_type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
Check_Type (signal_data, T_STRING);
|
||||
c_signal_data = StringValuePtr (signal_data);
|
||||
weechat_hook_signal_send (c_signal, c_type_data,
|
||||
API_STR2PTR(c_signal_data));
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (c_signal, c_type_data,
|
||||
API_STR2PTR(c_signal_data));
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3119,10 +3119,11 @@ weechat_ruby_api_hook_hsignal_send (VALUE class, VALUE signal, VALUE hashtable)
|
|||
{
|
||||
char *c_signal;
|
||||
struct t_hashtable *c_hashtable;
|
||||
int rc;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (NIL_P (signal) || NIL_P (hashtable))
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
Check_Type (signal, T_STRING);
|
||||
Check_Type (hashtable, T_HASH);
|
||||
|
@ -3133,12 +3134,12 @@ weechat_ruby_api_hook_hsignal_send (VALUE class, VALUE signal, VALUE hashtable)
|
|||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (c_signal, c_hashtable);
|
||||
rc = weechat_hook_hsignal_send (c_signal, c_hashtable);
|
||||
|
||||
if (c_hashtable)
|
||||
weechat_hashtable_free (c_hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -626,8 +626,9 @@ weechat_ruby_load (const char *filename)
|
|||
&weechat_ruby_api_buffer_input_data_cb,
|
||||
&weechat_ruby_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("ruby_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ruby_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("ruby_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
ruby_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -686,8 +687,8 @@ weechat_ruby_unload (struct t_plugin_script *script)
|
|||
if (interpreter)
|
||||
rb_gc_unregister_address (interpreter);
|
||||
|
||||
weechat_hook_signal_send ("ruby_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("ruby_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -464,9 +464,9 @@ script_action_autoload (const char *name, int quiet, int autoload)
|
|||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_autoload",
|
||||
script_language[ptr_script->language]);
|
||||
weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename);
|
||||
free (filename);
|
||||
}
|
||||
if (!quiet)
|
||||
|
@ -546,9 +546,9 @@ script_action_install_process_cb (void *data, const char *command,
|
|||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_install",
|
||||
script_language[ptr_script->language]);
|
||||
weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename2);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename2);
|
||||
free (filename2);
|
||||
}
|
||||
free (filename);
|
||||
|
@ -734,9 +734,9 @@ script_action_remove (const char *name, int quiet)
|
|||
snprintf (str_signal, sizeof (str_signal),
|
||||
"%s_script_remove",
|
||||
script_language[ptr_script->language]);
|
||||
weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename);
|
||||
(void) weechat_hook_signal_send (str_signal,
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
filename);
|
||||
free (filename);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2918,42 +2918,41 @@ weechat_tcl_api_hook_signal_send (ClientData clientData, Tcl_Interp *interp,
|
|||
{
|
||||
Tcl_Obj *objp;
|
||||
char *signal, *type_data;
|
||||
int number;
|
||||
int i;
|
||||
int number, i, rc;
|
||||
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_signal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (objc < 4)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = Tcl_GetStringFromObj (objv[1], &i);
|
||||
type_data = Tcl_GetStringFromObj (objv[2], &i);
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
Tcl_GetStringFromObj (objv[3], &i)); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
Tcl_GetStringFromObj (objv[3], &i)); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_INT) == 0)
|
||||
{
|
||||
if (Tcl_GetIntFromObj (interp, objv[3], &number) != TCL_OK)
|
||||
{
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
&number); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
&number); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
else if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_POINTER) == 0)
|
||||
{
|
||||
weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
API_STR2PTR(Tcl_GetStringFromObj (objv[3], &i))); /* signal_data */
|
||||
API_RETURN_OK;
|
||||
rc = weechat_hook_signal_send (signal,
|
||||
type_data,
|
||||
API_STR2PTR(Tcl_GetStringFromObj (objv[3], &i))); /* signal_data */
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
API_RETURN_ERROR;
|
||||
API_RETURN_INT(WEECHAT_RC_ERROR);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3025,11 +3024,11 @@ weechat_tcl_api_hook_hsignal_send (ClientData clientData, Tcl_Interp *interp,
|
|||
Tcl_Obj *objp;
|
||||
char *signal;
|
||||
struct t_hashtable *hashtable;
|
||||
int i;
|
||||
int i, rc;
|
||||
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_ERROR);
|
||||
API_FUNC(1, "hook_hsignal_send", API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
if (objc < 3)
|
||||
API_WRONG_ARGS(API_RETURN_ERROR);
|
||||
API_WRONG_ARGS(API_RETURN_INT(WEECHAT_RC_ERROR));
|
||||
|
||||
signal = Tcl_GetStringFromObj (objv[1], &i);
|
||||
hashtable = weechat_tcl_dict_to_hashtable (interp, objv[2],
|
||||
|
@ -3037,12 +3036,12 @@ weechat_tcl_api_hook_hsignal_send (ClientData clientData, Tcl_Interp *interp,
|
|||
WEECHAT_HASHTABLE_STRING,
|
||||
WEECHAT_HASHTABLE_STRING);
|
||||
|
||||
weechat_hook_hsignal_send (signal, hashtable);
|
||||
rc = weechat_hook_hsignal_send (signal, hashtable);
|
||||
|
||||
if (hashtable)
|
||||
weechat_hashtable_free (hashtable);
|
||||
|
||||
API_RETURN_OK;
|
||||
API_RETURN_INT(rc);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -364,8 +364,9 @@ weechat_tcl_load (const char *filename)
|
|||
&weechat_tcl_api_buffer_input_data_cb,
|
||||
&weechat_tcl_api_buffer_close_cb);
|
||||
|
||||
weechat_hook_signal_send ("tcl_script_loaded", WEECHAT_HOOK_SIGNAL_STRING,
|
||||
tcl_current_script->filename);
|
||||
(void) weechat_hook_signal_send ("tcl_script_loaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING,
|
||||
tcl_current_script->filename);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -422,8 +423,8 @@ weechat_tcl_unload (struct t_plugin_script *script)
|
|||
|
||||
Tcl_DeleteInterp(interp);
|
||||
|
||||
weechat_hook_signal_send ("tcl_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
(void) weechat_hook_signal_send ("tcl_script_unloaded",
|
||||
WEECHAT_HOOK_SIGNAL_STRING, filename);
|
||||
if (filename)
|
||||
free (filename);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ struct timeval;
|
|||
* please change the date with current one; for a second change at same
|
||||
* date, increment the 01, otherwise please keep 01.
|
||||
*/
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20140122-01"
|
||||
#define WEECHAT_PLUGIN_API_VERSION "20140210-01"
|
||||
|
||||
/* macros for defining plugin infos */
|
||||
#define WEECHAT_PLUGIN_NAME(__name) \
|
||||
|
@ -591,16 +591,16 @@ struct t_weechat_plugin
|
|||
const char *type_data,
|
||||
void *signal_data),
|
||||
void *callback_data);
|
||||
void (*hook_signal_send) (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
int (*hook_signal_send) (const char *signal, const char *type_data,
|
||||
void *signal_data);
|
||||
struct t_hook *(*hook_hsignal) (struct t_weechat_plugin *plugin,
|
||||
const char *signal,
|
||||
int (*callback)(void *data,
|
||||
const char *signal,
|
||||
struct t_hashtable *hashtable),
|
||||
void *callback_data);
|
||||
void (*hook_hsignal_send) (const char *signal,
|
||||
struct t_hashtable *hashtable);
|
||||
int (*hook_hsignal_send) (const char *signal,
|
||||
struct t_hashtable *hashtable);
|
||||
struct t_hook *(*hook_config) (struct t_weechat_plugin *plugin,
|
||||
const char *option,
|
||||
int (*callback)(void *data,
|
||||
|
|
|
@ -424,8 +424,9 @@ xfer_send_signal (struct t_xfer *xfer, const char *signal)
|
|||
{
|
||||
if (xfer_add_to_infolist (infolist, xfer))
|
||||
{
|
||||
weechat_hook_signal_send (signal, WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
(void) weechat_hook_signal_send (signal,
|
||||
WEECHAT_HOOK_SIGNAL_POINTER,
|
||||
infolist);
|
||||
}
|
||||
weechat_infolist_free (infolist);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue