Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: [Need support] Need do send fake msg  (Read 6850 times)

0 Members and 1 Guest are viewing this topic.

Thiago

  • Anope User
  • Offline Offline
  • Posts: 3
[Need support] Need do send fake msg
« on: November 02, 2011, 06:02:41 PM »

I need something like that: /nickserv fakemsg nick1 nick2 message
Both nicks need to be online and so the nick1 will send the message to nick2, nick1 won't know that... only nick2 will receive the message

I made a module but in privmsg command i don't know how to do:

Code: [Select]
char *cmd = moduleGetLastBuffer();
char *fn = NULL;
char *vn = NULL;
char *msg = NULL;
fn = myStrGetToken(cmd, ' ', 0);
vn = myStrGetToken(cmd, ' ', 1);
msg = myStrGetTokenRemainder(cmd, ' ', 2);
User *u1 = finduser(fn);
User *u2 = finduser(vn);
privmsg(u1->nick, u2->nick, msg);

The u2->nick is working well... the error is in the u1->nick because when i change the u1->nick to s_NickServ the code works very well
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: [Need support] Need do send fake msg
« Reply #1 on: November 03, 2011, 08:41:16 AM »

What you ask is not possible due to "direction" restrictions most IRC servers impliment. What this means is say you have 3 servers A<->B<->C, and you have user1 on server A, if server B receives a message from user1 through its link to server C, server B will reject it as it knows user1 is ONLY sends messages through it's link to server A.
« Last Edit: November 03, 2011, 08:43:54 AM by Jobe »
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

Thiago

  • Anope User
  • Offline Offline
  • Posts: 3
Re: [Need support] Need do send fake msg
« Reply #2 on: November 03, 2011, 10:23:25 AM »

So.. The fakemsg isn't possible or i can do this with a ircd module?
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: [Need support] Need do send fake msg
« Reply #3 on: November 03, 2011, 10:33:42 AM »

Youd need an iRCd module on EVERY IRCd you have on your network to be able to do it.
Logged
Your IP: ()
My IRC Status:

Come along and visit http://www.anopequotes.org/

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: [Need support] Need do send fake msg
« Reply #4 on: November 03, 2011, 10:40:27 AM »

+ you wouldn't have to just implement the command, you d have to handle all message handling in the modules yourself because you can't rely on the s2s protocol as it would reject the messages as invalid..

that said, all of this relies on your IRCd's server-to-server protocol.. I don't know if all ircd's implement the "direction" restrictions..

I dislike the very concept of this fake mesage stuff though.. smells like abuse..  :-\
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Thiago

  • Anope User
  • Offline Offline
  • Posts: 3
Re: [Need support] Need do send fake msg
« Reply #5 on: November 03, 2011, 10:52:43 AM »

i think this to... but i won't use in my network, it's only for training...
i'm learning how to make some modules of anope

tks
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: [Need support] Need do send fake msg
« Reply #6 on: November 03, 2011, 03:49:12 PM »

i think this to... but i won't use in my network, it's only for training...
i'm learning how to make some modules of anope

tks

My suggestion is to learn by coding something useful that you will use and doesn't abuse users.
Logged
Pages: [1]   Go Up