comparison src/server.c @ 1771:213607e89598

[gaim-migrate @ 1781] plug mem leak. don't show evil level if it decreased. mid's utf8 patch for jabber. my girlfriend got an accounting calculator today, you know, with the paper and the printing and things. it's kinda loud. she's really happy about having it. she had bought a different one yesterday but it didn't work so we returned it today. we also went to Albertson's and bought groceries. we bought 72 cans of soda for $15. That's 20 cents per soda. Not bad. we also bought a cow; i'm going to cook it tonight. ben&jerry's ice cream is good. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 30 Apr 2001 01:25:30 +0000
parents 68eddf56f419
children 896432d66303
comparison
equal deleted inserted replaced
1770:7249312f46dc 1771:213607e89598
539 539
540 540
541 541
542 void serv_got_eviled(struct gaim_connection *gc, char *name, int lev) 542 void serv_got_eviled(struct gaim_connection *gc, char *name, int lev)
543 { 543 {
544 char *buf2 = g_malloc(1024); 544 char buf2[1024];
545 GtkWidget *d, *label, *close; 545 GtkWidget *d, *label, *close;
546 546
547
548 plugin_event(event_warned, gc, name, (void *)lev, 0); 547 plugin_event(event_warned, gc, name, (void *)lev, 0);
549 548
550 g_snprintf(buf2, 1023, "%s has just been warned by %s.\nYour new warning level is %d%%", 549 if (gc->evil > lev) {
550 gc->evil = lev;
551 return;
552 }
553
554 gc->evil = lev;
555
556 g_snprintf(buf2, sizeof(buf2), "%s has just been warned by %s.\nYour new warning level is %d%%",
551 gc->username, ((name == NULL)? "an anonymous person" : name), lev); 557 gc->username, ((name == NULL)? "an anonymous person" : name), lev);
552
553 558
554 d = gtk_dialog_new(); 559 d = gtk_dialog_new();
555 gtk_widget_realize(d); 560 gtk_widget_realize(d);
556 aol_icon(d->window); 561 aol_icon(d->window);
557 562