Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <unistd.h>
- #include <string.h>
- #include <netdb.h>
- #include <stdarg.h>
- #include <ctype.h>
- #include <stdlib.h>
- #include <netinet/in.h>
- #include <sys/queue.h>
- #include <pthread.h>
- #include <dlfcn.h>
- struct exchange
- {
- int running;
- void (*irc_raw)(char *, ...);
- void (*irc_say)(char *, ...);
- };
- void
- plugin_get(struct exchange *e, char *buf)
- {
- int index=0, i;
- if(!e || !buf)
- return;
- if(strstr(buf, "rateit")==buf&&(strstr(buf, "http")==buf+7||strstr(buf, "www.")==buf+7))
- {
- for(i=0; i<strlen(buf); ++i)
- index+=buf[i];
- index+=time(NULL);
- srand(index);
- e->irc_say(rand()%100+"");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement