libpurple/plugins/mono/GetBuddyBack.cs

Thu, 07 Jun 2007 05:28:05 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Thu, 07 Jun 2007 05:28:05 +0000
changeset 17642
c0409038fd04
parent 15938
1b037158411e
child 16238
33bf2fd32108
child 18068
b6554e3c8224
child 20478
46933dc62880
permissions
-rw-r--r--

Don't create the temp GString unless it's actually needed, and avoid
doing an strlen() there unless that's really needed.

15938
1b037158411e SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents: 15600
diff changeset
1 using Purple;
11660
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
2
15600
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
3 public class GetBuddyBack : Plugin
11660
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
4 {
15938
1b037158411e SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents: 15600
diff changeset
5 private static PluginInfo info = new PluginInfo("mono-buddyback", "C# Get Buddy Back", "0.1", "Prints when a Buddy returns", "Longer Description", "Eoin Coffey", "urled");
15600
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
6
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
7 public GetBuddyBack()
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
8 : base (info)
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
9 {
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
10 }
393bc032b053 sf patch #1640011, from Celso Pinto
Mark Doliner <markdoliner@pidgin.im>
parents: 15435
diff changeset
11
11660
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
12 public void HandleSig(object[] args)
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
13 {
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
14 Buddy buddy = (Buddy)args[0];
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
15
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
16 Debug.debug(Debug.INFO, "buddyback", "buddy " + buddy.Name + " is back!\n");
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
17 }
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
18
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
19 public override void Load()
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
20 {
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
21 Debug.debug(Debug.INFO, "buddyback", "loading...\n");
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
22
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
23 /*Signal.connect(BuddyList.GetHandle(), this, "buddy-back", new Signal.Handler(HandleSig));*/
15938
1b037158411e SF Patch #1686400 from Eoin Coffey ("ecoffey")
Richard Laager <rlaager@pidgin.im>
parents: 15600
diff changeset
24 BuddyList.OnBuddyStatusChanged.connect(this, new Signal.Handler(HandleSig));
11660
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
25 }
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
26
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
27 public override void Unload()
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
28 {
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
29 }
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
30
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
31 public override void Destroy()
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
32 {
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
33 }
a7cf8f7d43b3 [gaim-migrate @ 13945]
Eoin Coffey <ecoffey@soc.pidgin.im>
parents:
diff changeset
34 }

mercurial