Mercurial > pidgin
comparison src/util.c @ 180:0ff9f19b9b23
[gaim-migrate @ 190]
Option to automatically check for new versions
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 26 Apr 2000 07:39:17 +0000 |
parents | bfdc427b936d |
children | d7690984c0f1 |
comparison
equal
deleted
inserted
replaced
179:8d8faeab01f6 | 180:0ff9f19b9b23 |
---|---|
708 usr = usr->next; | 708 usr = usr->next; |
709 } | 709 } |
710 g_free(who); | 710 g_free(who); |
711 return NULL; | 711 return NULL; |
712 } | 712 } |
713 | |
714 void check_gaim_versions() | |
715 { | |
716 char *cur_ver; | |
717 char *tmp; | |
718 | |
719 cur_ver = (char *)malloc(BUF_LONG); | |
720 tmp = (char *)malloc(BUF_LONG); | |
721 | |
722 cur_ver = (char *)grab_url("http://www.marko.net/gaim/latest-gaim"); | |
723 | |
724 if (!strncasecmp(cur_ver, "g00", 3)) | |
725 { | |
726 free(cur_ver); | |
727 free(tmp); | |
728 return; | |
729 } | |
730 | |
731 g_snprintf(tmp, BUF_LONG, "%s", strstr(cur_ver, "plain")+9); | |
732 g_strchomp(tmp); | |
733 | |
734 if (strcasecmp(tmp, latest_ver)) | |
735 { | |
736 g_snprintf(cur_ver, BUF_LONG, "GAIM v%s is now available.\n\nDownload it at http://www.marko.net/gaim\n", tmp); | |
737 | |
738 do_error_dialog(cur_ver, "GAIM - New Version!"); | |
739 strcpy(latest_ver, tmp); | |
740 save_prefs(); | |
741 } | |
742 | |
743 free(tmp); | |
744 free(cur_ver); | |
745 } | |
746 | |
747 |