annotate plugins/mono/MPlugin.cs @ 12285:af257d8679fe

[gaim-migrate @ 14589] Ok, so I'm changing the semantics of gaim_account_notify_added, having it check for the existance of a buddy was breaking some jabber scenarios. So buddy checks should now be done in the prpls. I also added a gaim_account_request_add. _notify_added only notifies the user of the add, request_add notifies the user AND asks them if they want to add the buddy to their buddy list. I only updated jabber for these changes because it's the only protocol I really know at all well. So everyone PLEASE make sure that the other protocols get updated for this. That is make sure that when you expect to prompt the user to add the buddy you use _request_add instead of just using _notify_added and expecting the core to determine if it needs to prompt the user. Oh, there are also some other jabber changes which should hopefully fix some issues that people were seeing, like buddies not signing off when you unsubscribed with them, etc. Let me know if anyone notices any jabber oddities after this. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 01 Dec 2005 20:09:27 +0000
parents 67fbd2ff4c4e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 using Gaim;
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 public class MPlugin : GaimPlugin
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 public void HandleSig(object[] args)
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 Buddy buddy = (Buddy)args[0];
11980
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
8 Status old_status = (Status)args[1];
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
9 Status status = (Status)args[2];
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10
11980
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
11 Debug.debug(Debug.INFO, "mplug", "buddy " + buddy.Name + " went from " + old_status.Id + " to " + status.Id + "\n");
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 public override void Load()
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 Debug.debug(Debug.INFO, "mplug", "loading...\n");
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 /*Signal.connect(BuddyList.GetHandle(), this, "buddy-away", new Signal.Handler(HandleSig));*/
11980
67fbd2ff4c4e [gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents: 11660
diff changeset
19 BuddyList.OnBuddyStatusChanged.connect(this, new Signal.Handler(HandleSig));
11660
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 public override void Unload()
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 Debug.debug(Debug.INFO, "mplug", "unloading...\n");
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 public override void Destroy()
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 Debug.debug(Debug.INFO, "mplug", "destroying...\n");
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 public override GaimPluginInfo Info()
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 {
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 return new GaimPluginInfo("C# Plugin", "0.1", "Test C# Plugin", "Longer Description", "Eoin Coffey", "urled");
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 }
a3302d271199 [gaim-migrate @ 13945]
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 }