Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1] 2   Go Down

Author Topic: Migrate channels  (Read 24829 times)

0 Members and 1 Guest are viewing this topic.

n0kS Phr33d0m

  • Contributor
  • *
  • Offline Offline
  • Posts: 25
Migrate channels
« on: November 03, 2008, 02:35:06 AM »

Hello. To migrate all channel data to another (not registered channel/or registered....)
/msg cs migrate <#chan1> <#chan2> <pass chan1> (<pass chan2> if channel registered)

This is... to make cut and paste (not copy & paste...). Like only to change channel's name...

Thanks.
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
Re: Migrate channels
« Reply #1 on: November 03, 2008, 05:50:04 AM »

heard this asked for many times, would be nice to see it either as a mod or core feature
Logged
my God my tourniquet, return to me salvation

Andrew B.

  • o.O
  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 35
    • Keyboard-Failure
Re: Migrate channels
« Reply #2 on: November 03, 2008, 06:53:50 AM »

So like two channels merging? -- Seems like it would be simple to do.
Logged
Andrew Berquist,

irc.kbfail.net

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: Migrate channels
« Reply #3 on: November 03, 2008, 08:54:53 AM »

Would be easy enough for a module to do, but I'd be happy to see it as a core feature too.
Logged
Your IP: ()
My IRC Status:

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

n0kS Phr33d0m

  • Contributor
  • *
  • Offline Offline
  • Posts: 25
Re: Migrate channels
« Reply #4 on: November 03, 2008, 12:21:59 PM »

So like two channels merging? -- Seems like it would be simple to do.

No. That wasn't my first idea...
In simple words, this command changes only the channel's name... (#chan1 to #chan12313 or something)

I'll try to explain (sorry for my bad english...):

I'm user in the network and I own a channel #infernum (with password: r123) and I have a lot of people in my lists (sop aop vop...), I've changed mlock settings, mail, etc.... and I don't want to drop this channel and to do all this again when I register the new one, so I use the migrate command.
*** Here are two options:
** Non registered channel:
/msg cs migrate <#chan1> <#chan2> <pass chan1>
1. I enter channel #boooooom (I have @ and I'm able to register...) so I type the command "/msg cs migrate #infernum #boooooom r123" and every option, access list, etc. copies to my new channel #boooooom and the old one (#infernum) gets dropped.
(if there is any way to redirect users to the channel.... like CS to kick them and with mode "+lL 1 #<newchannel>" (in Unreal) users will autojoin the new channel (the problem is if the user doesn't have autojoin on kick... but this is not a big problem))

** Registered channel:
/msg cs migrate <#chan1> <#chan2> <pass chan1> <pass chan2>
2. I join channel #boooooom (that is registered to me, or I know the founder's password (for example ppp555)) so I type "/msg cs migrate #infernum #boooooom r123 ppp555" and then the same in 1.

Thanks.
« Last Edit: November 03, 2008, 12:24:10 PM by n0kS »
Logged

Charles Kingsley

  • Contributor
  • *
  • Offline Offline
  • Posts: 1405
Re: Migrate channels
« Reply #5 on: November 04, 2008, 07:12:19 AM »

Definitely interesting.
Logged

deiks

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 139
  • Shizle my nizle
Re: Migrate channels
« Reply #6 on: November 04, 2008, 12:51:10 PM »

** Non registered channel:1. I enter channel #boooooom (I have @ and I'm able to register...) so I type the command "/msg cs migrate #infernum #boooooom r123" and every option, access list, etc. copies to my new channel #boooooom and the old one (#infernum) gets dropped.
(if there is any way to redirect users to the channel.... like CS to kick them and with mode "+lL 1 #<newchannel>" (in Unreal) users will autojoin the new channel (the problem is if the user doesn't have autojoin on kick... but this is not a big problem))
[/quote]

Option: If channel isn't registered, check if user is op on unregistered chan
Logged

zEkE

  • Anope User
  • Offline Offline
  • Posts: 34
Re: Migrate channels
« Reply #7 on: November 04, 2008, 02:54:58 PM »

naturally it should apply any security to the command that would otherwise apply to CS REGISTER (including oper-only/no registering modules, is the user op, etc).
Logged

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: Migrate channels
« Reply #8 on: November 04, 2008, 04:13:56 PM »

Well, for the "oper only/no registering" modules, they would have to be updated themselves, because they only restrict access to commands by re-binding them.
Logged
Your IP: ()
My IRC Status:

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

n0kS Phr33d0m

  • Contributor
  • *
  • Offline Offline
  • Posts: 25
Re: Migrate channels
« Reply #9 on: November 04, 2008, 07:10:56 PM »

Module Complete! (in 1 day eh! :D )

URL: http://modules.anope.org/viewmod.php?id=175
Author: mark
Logged

techgeek

  • Anope User
  • Offline Offline
  • Posts: 7
Re: Migrate channels
« Reply #10 on: November 08, 2008, 02:33:50 AM »

I really think the idea of cs_migrate is pretty cool.  Mark, if you could please make it for Windows, I would great appreciate it.  Thanks.
Logged

TwinShadow

  • Anope User
  • Offline Offline
  • Posts: 64
    • ShadowHime
Re: Migrate channels
« Reply #11 on: November 08, 2008, 03:44:43 AM »

I think this should be moved to the modules forum, but I'll put in my two cents in.

There are some people who have BotServ settings as well, so I'm curious, does it also transfer BotServ stuff as well or do those have to be reset?
Logged

deiks

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 139
  • Shizle my nizle
Re: Migrate channels
« Reply #12 on: November 09, 2008, 01:02:27 PM »

For that could be /bs migrate
Logged

Master

  • Anope User
  • Offline Offline
  • Posts: 56
Re: Migrate channels
« Reply #13 on: November 14, 2008, 08:32:32 PM »

Wouldn't this have some security concerns? It'd make the channel extremely easy to take over ><...
Perhaps make it so only the founder can merge the old channel, and verification is sent via memo to the founder of the new channel (then he has to type a code to complete the merge)? Of course, this would likely apply only if the second channel is registered...
Logged
Always believe Murphy's Law. If you don't, watch what happens.

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: Migrate channels
« Reply #14 on: November 14, 2008, 11:43:23 PM »

The only security this really needs is A) make sure the destination channel is NOT already registered, B) make sure the user doing the merge has +o on the destination channel and C) the user MUST be the REAL found of the source channel, and NOT just identified to the channel using the channels password.
Logged
Your IP: ()
My IRC Status:

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

fisben

  • Anope User
  • Offline Offline
  • Posts: 5
Re: Migrate channels
« Reply #15 on: November 20, 2008, 07:14:02 AM »

how to restrict access to this command only service administrators? (sorry for my bad english)
Logged

deiks

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 139
  • Shizle my nizle
Re: Migrate channels
« Reply #16 on: November 20, 2008, 02:32:51 PM »

Why would you to that couse it is made for regulars users

But if you really want:

Find:

if (!is_services_admin(u) && ((source->flags & CI_SECUREFOUNDER ? !is_real_founder(u, source) : !is_founder(u, source)) && (dest->flags & CI_SECUREFOUNDER ? !is_real_founder(u, dest) : !is_founder(u, dest))))

Replace with:

if (!is_services_admin(u))

Chears

« Last Edit: November 20, 2008, 02:37:31 PM by [dx] »
Logged

fisben

  • Anope User
  • Offline Offline
  • Posts: 5
Re: Migrate channels
« Reply #17 on: November 20, 2008, 03:48:13 PM »

Why would you to that couse it is made for regulars users

But if you really want:

Find:

if (!is_services_admin(u) && ((source->flags & CI_SECUREFOUNDER ? !is_real_founder(u, source) : !is_founder(u, source)) && (dest->flags & CI_SECUREFOUNDER ? !is_real_founder(u, dest) : !is_founder(u, dest))))

Replace with:

if (!is_services_admin(u))

Chears


thanks for answer!

Somebody can make the version for 1.6.*? I think its very useful module. I can't use this version for some reasons :(
Logged

deiks

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 139
  • Shizle my nizle
Re: Migrate channels
« Reply #18 on: November 20, 2008, 07:02:48 PM »

Some reason == Your Anope version. :]

Upgrade to 1.8 Branch :)
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: Migrate channels
« Reply #19 on: November 20, 2008, 11:19:50 PM »

A module author would have to be insane to, at this point, write new modules for a branch that is soon to become deprecated.. not even mentioning that writing for 1.6 is torture..
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

fisben

  • Anope User
  • Offline Offline
  • Posts: 5
Re: Migrate channels
« Reply #20 on: November 24, 2008, 03:37:02 AM »

Some reason == Your Anope version. :]

Upgrade to 1.8 Branch :)
Some reason == Inaccessibility of a patch bynets.org for anope 1.7. There is a version only for 1.6

ok, and how it is possible to rename manually channels if I have an access on a shell?
« Last Edit: November 24, 2008, 03:38:51 AM by fisben »
Logged

zEkE

  • Anope User
  • Offline Offline
  • Posts: 34
Re: Migrate channels
« Reply #21 on: November 24, 2008, 03:42:33 AM »

Could be done via SQL.

Would take a while, but the process would be something like this:

Configure Anope to write to SQL database, and force an update of the database.
Check, make sure database was written successfully.
Shutdown Anope.
Rename channel as desired in SQL database.
Configure Anope to "UseDB", in order to read from the SQL database.
Start Anope.
Remove SQL configuration if desired (probably will be).
Logged

Jan Milants

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1372
Re: Migrate channels
« Reply #22 on: November 24, 2008, 09:29:31 PM »

since anope 1.6 does not support starting from SQL (phase 2 - implemented in 1.7) this would be impossible in anope 1.6
Logged
If you like me donate coins to 1FBmZVT4J8WAUMHKqpWhgNVj3XXnRN1cCk :)

Jobe

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 1023
    • Anope IRC Services
Re: Migrate channels
« Reply #23 on: November 24, 2008, 10:14:58 PM »

Some reason == Inaccessibility of a patch bynets.org for anope 1.7. There is a version only for 1.6

Apologies if I have misunderstood you on this, but are you saying you are using a modified version of Anope 1.6.5?
Logged
Your IP: ()
My IRC Status:

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

fisben

  • Anope User
  • Offline Offline
  • Posts: 5
Re: Migrate channels
« Reply #24 on: November 25, 2008, 03:12:51 AM »

Apologies if I have misunderstood you on this, but are you saying you are using a modified version of Anope 1.6.5?
Yes it so. The patch removes vulnerability (takeover) in names of channels in Russian locale.
Logged
Pages: [1] 2   Go Up