lookjapan.COM - IRC ve mIRC dünyasının forumu!

lookjapan.COM - IRC ve mIRC dünyasının forumu! (http://www.lookjapan.com/index.php)
-   IRCServices Hazır Kodlar (http://www.lookjapan.com/forumdisplay.php?f=180)
-   -   /Services Motd Komutu (http://www.lookjapan.com/showthread.php?t=2289)

Code 23 Eylül 2015 16:33

/Services Motd Komutu
 
Nickserv üzerinden "/services motd" komutu , umarım işinize yarar.

cd ircservices*-*

Kod:

nano -w modules/nickserv/main.c
girip

Kod:

static void do_help(User *u);
altına

Kod:

static void do_motd(User *u);
ekleyin.

Aynı dosya icerisinde

Kod:

{ "SIDENTIFY",do_identify, NULL,  -1,
ustune

Kod:

{ "MOTD", do_motd, NULL, -1, -1,-1 },
ekleyin

Aynı dosya icerisinde

Kod:


/*************************************************************************/
static void do_identify(User *u)
{
    char *pass = strtok_remaining();
    NickInfo *ni = NULL;
    NickGroupInfo *ngi = NULL;

satirinin üstüne

Kod:


/**************************************************************/
static void do_motd(User *u)
{
#define motdoku "motd.txt"
FILE *x;
char buf[BUFSIZE];
x = fopen(motdoku, "r");
if (x) {
while (fgets(buf, sizeof(buf), x)) {
buf[strlen(buf)-1] = 0;
send_cmd(s_NickServ, "NOTICE %s %s", u->nick, buf);
}
fclose(x);
} else {
send_cmd(s_NickServ, "NOTICE %s Motd Henuz girilmemis..", u->nick);
}
}

ekleyin

make & make install cekerek servislerinize res atin.

daha sonra motd.txt hazırlayıp lib/ icine atin.

Kodlar toXic e Aittir. *


All times are GMT +3. The time now is 10:47.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.