+static int peernew(struct fnetnode *fn, struct fnetpeer *peer, void *uudata)
+{
+ struct uidata *data;
+
+ for(data = actives; data != NULL; data = data->next)
+ {
+ if(data->notify.b.fnpeer)
+ newnotif(data, 630, NOTIF_INT, fn->id, NOTIF_STR, peer->id, NOTIF_STR, peer->nick, NOTIF_END);
+ }
+ return(0);
+}
+
+static int peerdel(struct fnetnode *fn, struct fnetpeer *peer, void *uudata)
+{
+ struct uidata *data;
+
+ for(data = actives; data != NULL; data = data->next)
+ {
+ if(data->notify.b.fnpeer)
+ newnotif(data, 631, NOTIF_INT, fn->id, NOTIF_STR, peer->id, NOTIF_END);
+ }
+ return(0);
+}
+
+static int peerchange(struct fnetnode *fn, struct fnetpeer *peer, struct fnetpeerdi *di, void *uudata)
+{
+ struct uidata *data;
+ struct notif *notif;
+ wchar_t buf[32];
+
+ for(data = actives; data != NULL; data = data->next)
+ {
+ if(data->notify.b.fnpeer)
+ {
+ for(notif = data->fnotif; notif != NULL; notif = notif->next)
+ {
+ if((notif->code == 632) && (notif->state == NOTIF_PEND) && (notif->argv[0].d.n == fn->id) && !wcscmp(notif->argv[1].d.s, peer->id))
+ break;
+ }
+ if(notif == NULL)
+ notif = newnotif(data, 632, NOTIF_INT, fn->id, NOTIF_STR, peer->id, NOTIF_STR, peer->nick, NOTIF_END);
+ notifappend(notif, NOTIF_STR, di->datum->id, NOTIF_INT, di->datum->datatype, NOTIF_END);
+ switch(di->datum->datatype)
+ {
+ case FNPD_INT:
+ notifappend(notif, NOTIF_INT, di->data.num, NOTIF_END);
+ break;
+ case FNPD_STR:
+ notifappend(notif, NOTIF_STR, di->data.str, NOTIF_END);
+ break;
+ case FNPD_LL:
+ swprintf(buf, sizeof(buf) / sizeof(*buf), L"%lli", di->data.lnum);
+ notifappend(notif, NOTIF_STR, buf, NOTIF_END);
+ break;
+ }
+ }
+ }
+ return(0);
+}
+