On 02/04/05 21:31:36, Don Seiler wrote:
> + void bnet_user_squelch(GaimConnection *gc, const gchar *who) {
> + BNetConn *conn =3D BNET_CONN(gc->proto_data);
> +
> + if (conn->vw_nick)
> + g_free(conn->vw_nick);
> + conn->vw_nick =3D g_strdup(
> + gaim_normalize(conn->account, who));
> +
> + gaim_debug_info("bnet", "/squelch %s\n", who);
> + bnet_conn_send(conn, "/squelch %s\n", who);
> + }
> +
> + void bnet_user_unsquelch(GaimConnection *gc, const gchar *who) {
> + BNetConn *conn =3D BNET_CONN(gc->proto_data);
> +
> + if (conn->vw_nick)
> + g_free(conn->vw_nick);
> + conn->vw_nick =3D g_strdup(
> + gaim_normalize(conn->account, who));
> +
> + gaim_debug_info("bnet", "/unsquelch %s\n", who);
> + bnet_conn_send(conn, "/unsquelch %s\n", who);
> + }
You don't need to set conn->vw_nick to who.
I used it only to remember the nick of the user to whom was directed =20
the last /where message (and also that we must show that result in a =20
window). This is mainly needed because, if the user is offline, the =20
answer wont contain its nick (it will be a sort of 'ERROR User is =20
offline'), so we must save it somewhere before.
cya
|