cs_saregister bot mIRC for Anope 2.0+ (with UnrealIRCd)

By hlpxbr on Oct 01, 2017

I wrote this to use with my network

Syntax: !regchan

Function: The function is to act like the old module cs_saregister from Anope 1.8.9

Warning: The user needs to have level 10 or more (/auser 10 nick)
Warning: This only works in #Staff Channel
Warning: This only works with Anope 2.0+ and UnrealIRCd

on *:text:!regchan*:#Staff:{
  if ($2 == $null) || ($3 == $null) || ($level($nick) <= 9) {
    msg #Staff Syntax error, please use the following syntax: !regchan <channel> <nick of the founder of the channel>
    msg #Staff The nick needs to be registered with NickServ.
    msg #Staff Warning: only users with access on me can use this command, if you are using the correct syntax and the command isn't working, maybe this is the problem. (Your level is: $level($nick) $+ ) (Minimum level: 10)
  }
  else {
    cs info $2
    msg #Staff Running the first step: is the Channel registered or not?
    set %cs_saregister.status CheckingIfRegistered
    set %cs_saregister.nickFounder $3
    set %cs_saregister.nickReg $nick
    set %cs_saregister.channel $2

  }
} 

on *:text:!regnick*:#Staff:{
  msg #Staff To register nicks please use the NickServ to do this: /msg NickServ SAREGISTER <nick> <password> <e-mail>
}

alias registrarcanal {
  join %cs_saregister.channel
  msg #Staff Third step: Registering the channel... wait!
  .timer 1 3 cs register %cs_saregister.channel
  .timer 1 5 cs topic %cs_saregister.channel Channel registered by %cs_saregister.nickReg to %cs_saregister.nickFounder
  .timer 1 6 part %cs_saregister.channel
  .timer 1 7 cs set founder %cs_saregister.channel %cs_saregister.nickFounder
  .timer 1 8 msg #Staff Channel registered! %cs_saregister.nickReg to %cs_saregister.nickFounder $+ .
  .timer 1 10 unset %cs_saregister.*
}

on *:NOTICE:*:*:{
  ;Information for channel
  if ($1 == Information) && ($2 == for) && ($nick == ChanServ) {
    set %cs_saregister.status Registered
    msg #Staff First step: fail (The channel is registered!)
    unset %cs_saregister.*
  }
  ;Channel #BR isn't registered.
  if ($1 == Channel) && (registered isin $4) && ($nick == ChanServ) {
    set %cs_saregister.status NotRegistered
    ns info %cs_saregister.nickFounder
    msg #Staff Second step: is the Nick of the founder registered or not?
  }
  ;Nick BR isn't registered.
  ;Miss is
  if ($1 == %cs_saregister.nickFounder) && ($2 == is) && ($nick == NickServ) {
    registrarcanal
  }
  if ($1 == Nick) && (%cs_saregister.nickFounder == $strip($2)) && ($4 == registered.) && ($nick == NickServ) {
    msg #Staff Second step: fail (The nick of founder isn't registered!)
    unset %cs_saregister.*
  }

}

Comments

Sign in to comment.
agariogames   -  3 days ago

I think you are right to say so. Your share is great, I found a lot of things in your post. basketball legends unblocked

 Respond  
ayeshagurgaon   -  Mar 19, 2018

I am pleased to peruse this post and every one of the points of interest are great in this post. Independent Gurgaon Escorts

 Respond  
annashetty   -  Jan 31, 2018

it's been operating for a long time in this publish for a great concept on it. I truly very experience analyzing your true and beneficial post thanks and you guys doing the sort of great job keep it up cool math games

 Respond  
Alisha5050   -  Jan 18, 2018

I am delighted to read this post and all the details are awesome in this post. Vip Escorts in South Delhi

 Respond  
simo   -  Oct 02, 2017

as services root in anope 2.0* u can register any channel without the need for a module and transfer founder access to anyone

hlpxbr  -  Oct 04, 2017

Yes, in fact. But, if you are lazy same to me, you will prefer to use a unique command to do it.

simo  -  Oct 05, 2017

you could add alias in ircd (using gottems fantasy module) to send commands to anope2 or u could even add the alias in anope2 that way it saves typing entire commands that way it goes thro the ircd/anope2 incase mirc is down, many ways to do this really

for example in unrealircd.conf u could add :
and have users do this in channel /chanreg #channel

alias "chanreg" {
format "^#" {
target "chanserv";
type services;
parameters "REGISTER %1-";
};
format "^[^#]" {
target "chanserv";
type services;
parameters "REGISTER %1-";
};
type command;
};

hlpxbr  -  Oct 05, 2017

Yes, i know, i think that u didn't understand me, so, this code is to replace the cs_saregister module for anope 1.8.x, the module cs_saregister register channels and set founder to the nick /cs saregister , you can't do it on anope 2.0 that doesn't have this option...

simo  -  Oct 06, 2017

also if a user cant register his own channel by him/herselve ( and need others to register it for them ) they are not fit to run it

jacklynnvern  -  Dec 02, 2017

Hi everyone,

always been a bit of lurker around here I have not used UnrealIRCD for many years however a time has come where I wish to get involved again and start using.
surveillancekart
m |pestveda

I am having some issues trying to link Anope to UnrealIRCD (UnrealIRCd 4.0.4 & Anope 2.0.3)

the error I am getting appears to be very generic.

unrealircd.conf thanks 4 sharing

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.