Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2   Go Down

Author Topic: [Module] cs_join.c  (Read 20061 times)

0 Members and 1 Guest are viewing this topic.

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
[Module] cs_join.c
« on: August 15, 2006, 06:16:15 PM »

Description: This module will make ChanServ JOIN / PART a channel & will automatically set modes +oq ChanServ ChanServ on a channel.

Why?: This module is designed for ppl who wanted to have @ChanServ sits on their channel along with a BotServ @Bots; and without the need of using ugly RAW commands for making ChanServ join a channel.

Providing commands:
/msg ChanServ JOIN #Channel
/msg ChanServ PART #Channel

Providing IRCD Handler for: KICK

Tested: UnrealIRCd 3.2.5 + Anope-1.7.15 (1128)

Download location: HERE
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #1 on: August 15, 2006, 07:16:11 PM »

very nice n00bie, just a hint because i know your learning (at a very nice speed to) but try to avoid using strtok, its used in the core and is very bad to use in a module. try using tokens instead, if you need any help catch me on IRC

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #2 on: August 15, 2006, 08:39:42 PM »

Thanks a lot Tom65789, Ok... i'll catch you up on IRC.
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Gman

  • Guest
(No subject)
« Reply #3 on: August 30, 2006, 07:24:46 PM »

have you a compiled win32 version of this module?
I haven't a much internet traffic for download requied software for compile C code :(
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #4 on: August 30, 2006, 08:54:16 PM »

lol, would ask n00bie for that one. i think he still might wanna update the code to avoid using strtok

Gman

  • Guest
(No subject)
« Reply #5 on: August 31, 2006, 08:59:31 AM »

Don't forget about Win32 russia users :)
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #6 on: August 31, 2006, 01:50:21 PM »

o.O i'm glad that you are interested in the module :*
like Tom said i've updated the code and replaced with a token... tested the module on 1.7.13 and above and works fine.

And as for the windows version, i'm currently downloading/upgrading(dial-up :p ) the VC++ 2005 express edition and cannot provide the .dll file for you yet. But i request/ask chaz to compile the mod and i hope that we will have a dll file soon for it ^_^
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
(No subject)
« Reply #7 on: August 31, 2006, 01:51:12 PM »

Already done, should be in your inbox.
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #8 on: August 31, 2006, 01:56:45 PM »

almost n00bie, just need to fix those mem leaks now :P Tokens use memory and you need to free(); it

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #9 on: August 31, 2006, 02:24:01 PM »

:0 finally here we go ^^
http://noobie.esmartkid.com/mymods/cs_join.c

For windows version: see attachment
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Gman

  • Guest
(No subject)
« Reply #10 on: September 04, 2006, 03:55:49 PM »

Probably attached file?
after clicking on link -and then nothing :D

termiftp@mail.ru
Logged

heinz

  • Guest
(No subject)
« Reply #11 on: September 04, 2006, 04:12:43 PM »

The attached file is there and working fine... What's the problem?
Logged

Tom65789

  • Anope User
  • Offline Offline
  • Posts: 343
    • www.t65789.co.uk
(No subject)
« Reply #12 on: September 04, 2006, 04:47:47 PM »

works fine here as well. i dont see whats wrong.

Alex

  • Guest
(No subject)
« Reply #13 on: September 04, 2006, 07:54:24 PM »

I have a question regarding to the module cs_join.c

After that I installed Anope-1.7.15, the module show the following for some reason: ChanServ@localhost.net which it didn't when I used it on Anope-1.7.14.

Is it anyone that have an idea what this causes, it would be appreciated. (I have checked in my services.conf)

Thanks.
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #14 on: September 04, 2006, 09:23:47 PM »

sorry, i don't understand what you exactly mean here. are you sure that thing(?) shows from the cs_join module ?
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Alex

  • Guest
(No subject)
« Reply #15 on: September 04, 2006, 09:30:56 PM »

Hello n00bie,

Yes, that is what's showing up when it joins a channel,

ChanServ (services@localhost.net) has joined #ChannelName,

but what it was supposed to show should be:

ChanServ (services@network.net) had joined #ChannelName

Thanks.
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #16 on: September 04, 2006, 09:37:47 PM »

oh! i see. That was not a problem with the module. It was a settings from your services.conf itself.

# ServiceUser <usermask>  [REQUIRED]
#     Specifies the user@host mask which should be used by the Services
#     pseudoclients.  May be overridden by the -user and -host command-line
#     options.

ServiceUser "services@localhost.net"

maybe you change your services user name when using Anope1.7.14 to Anope-1.7.15. I guess you know what i mean. If that is not the problem, please tell again, thanks :)
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Alex

  • Guest
(No subject)
« Reply #17 on: September 04, 2006, 09:49:47 PM »

Hello n00bie,

The first thing I checked when I saw this, was to go into my services.conf to see if it was something missed there, and it was.
It was services@localnet.net so I changed this to services@network.net (with my real networkname), saved it and did /os Update and /os Reload, but nothing happened.

I'm not sure what I can have done wrong here, or if I should re-install Anope-1.7.15 again? I did just an upgrade from Anope-1.7.14.

Thanks.
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #18 on: September 04, 2006, 09:54:09 PM »

Ok, so when you upgrade your services from anope-1.7.14 to .15 have you restart your services ? if not, you need to restart and recompile the module(s) you have loaded. My guess is that you forget to restart your services (as you did not mentioned that you did /os restart ) :)
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Alex

  • Guest
(No subject)
« Reply #19 on: September 04, 2006, 09:58:11 PM »

Hello n00bie,

Oh my god I feel dumb now...lol. I had forgot to do /os restart, but did it right now and everything works fine. Thank you so much for your patiente and the great help. It was much appreciated. ;)
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #20 on: September 04, 2006, 09:59:26 PM »

your welcome :)
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

Gman

  • Guest
(No subject)
« Reply #21 on: September 06, 2006, 09:56:32 AM »

This is an a good idea to using modules without bad raw and other crash commands
:)
Thank you very much :D
Logged

PreciousAlly

  • Anope User
  • Offline Offline
  • Posts: 20
    • http://www.thesims2source.com/
(No subject)
« Reply #22 on: September 07, 2006, 05:17:19 AM »

n00bie, I'm getting this error:

Quote
<OperServ> Unable to load module cs_join


Any suggestions please??
Logged

n00bie

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 411
(No subject)
« Reply #23 on: September 07, 2006, 05:25:17 AM »

What exactly is the issue. Are you using windows or unix/linux ? Set your services in debug mode ( /os set debug on ) and try to load the module. Look at the services log files located inside the logs folder and paste what youv'e got there.
Logged
I am always doing things that which I cannot do, in order that I may learn how to do it.

PreciousAlly

  • Anope User
  • Offline Offline
  • Posts: 20
    • http://www.thesims2source.com/
(No subject)
« Reply #24 on: September 08, 2006, 05:23:57 AM »

I'm using windows. This is the error in the log file:

Quote
[Sep 08 00:22:12 2006] OperServ: PreciousAlly: set debug on
[Sep 08 00:22:12 2006] Debug mode activated
[Sep 08 00:22:12 2006] debug: Sent: :OperServ NOTICE PreciousAlly :Services are now in debug mode.
[Sep 08 00:22:14 2006] debug: Received: :PreciousAlly PRIVMSG OperServ@services.thesims2source.com :modload cs_join
[Sep 08 00:22:14 2006] OperServ: PreciousAlly: modload cs_join
[Sep 08 00:22:14 2006] Trying to load module [cs_join]
[Sep 08 00:22:14 2006] Runtime module location: .\modules\runtime\cs_join.dll.a05156
[Sep 08 00:22:15 2006] The specified module could not be found.


[Sep 08 00:22:15 2006] debug: Sent: :OperServ NOTICE PreciousAlly :Unable to load module cs_join
[Sep 08 00:22:15 2006] Module loading status: 6
[Sep 08 00:22:18 2006] debug: Received: :PreciousAlly PRIVMSG OperServ@services.thesims2source.com :set debug off
[Sep 08 00:22:18 2006] OperServ: PreciousAlly: set debug off
[Sep 08 00:22:18 2006] Debug mode deactivated
Logged
Pages: [1] 2   Go Up