umode +W

These are old archives. They are kept for historic purposes only.
Locked
grit

umode +W

Post by grit »

Hello. I am trying to make a module that allows regular users to do umode +W, but withouth editing the source. So it can be umode2 +W if it is needed. But anyway, i want to know a few things about modules, like how to catch a whois. So if somebody whois's somebody else, and the person who is being whois'd has the umode2 +W enabled, it needs to say: blabla did a /whois on you.

So what do i need, what headers do i need to include and how do i intercept a whois?
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Someone submitted such a module a few days ago to us (it adds a umode +m that normal users can set and notifies them as soon as someone whois'es them). However, it had a little bug (it stopped working after /rehash), as soon as that one is fixed by the author he'll resubmit it and I'll approve it.
Just to save you from doing duplicate work ;).

@your questions...
how to catch a whois? -> command overrides
See http://modules.unrealircd.com/ for info on all this.
Also, if you are stuck or don't understand it... just take a look at modules other people wrote.
All together it's not ment to be 'easy for everyone' like mirc scripting or whatever, so be prepared to spend several hours on all this.
Self-education is a nice thing :P
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

You don't need this to allow users to get +W. You can put +W on set::modes-on-connect and all users will get +W even if they are not opers.
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

You don't need this to allow users to get +W. You can put +W on set::modes-on-connect and all users will get +W even if they are not opers.
Which gets lost as soon as the user/client executes a MODE command (which a lot of clients do [to set themselves +i for example])...
Tricks like this (and putting illegal modes like 'S' in modes-on-oper) are NOT good, and you shouldn't be surprised if it might not work anymore at a later version.
Josh
Posts: 19
Joined: Wed May 19, 2004 3:39 pm
Location: New York, U.S.

Post by Josh »

If your network uses hidden hostmasks and you were to give any user +W, apon /whois they'll see the recipients' real host. So be careful on what you decide.
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

Easily fixable, I believe. Syzop?
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Josh wrote:If your network uses hidden hostmasks and you were to give any user +W, apon /whois they'll see the recipients' real host. So be careful on what you decide.
That's snomask +e that allows that.
syzop wrote:Tricks like this (and putting illegal modes like 'S' in modes-on-oper) are NOT good, and you shouldn't be surprised if it might not work anymore at a later version
... From the bugs forum:
codemaster wrote:Almost no error checking is done for any of the mode settings. You could add +N to modes-on-connect if you wanted to! If an admin, for whatever reason, has decided all opers should be +q, why should I tell them they can't?
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

Even though that would be a pretty bizarre reason...
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Josh
Posts: 19
Joined: Wed May 19, 2004 3:39 pm
Location: New York, U.S.

Post by Josh »

aquanight wrote:
Josh wrote:If your network uses hidden hostmasks and you were to give any user +W, apon /whois they'll see the recipients' real host. So be careful on what you decide.
That's snomask +e that allows that.
Loaded a clone of me, used services' raw and here's what displayed in the status window.
<9:42:59PM> * Services.*.net sets sets mode: +W
·
<9:43:22PM> -Nexus.*.net- *** Josh (ie@alb-24-195-*-*.nycap.rr.com) did a /whois on you.
·
<9:44:41PM> -> Server: mode Josh2
·
Josh2 +ixW
I had no 'Server notice mask (+e)', only +ixW.
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Ah.. you mean the whois notice... well, technically, only opers are supposed to get that. I guess the IRCd is assuming you are an oper because it is sending this notice to you...

Wierd. Though technically, you aren't supposed to have mode +W unless you are an oper.
w00t
Posts: 1136
Joined: Thu Mar 25, 2004 3:31 am
Location: Nowra, Australia

Post by w00t »

Correct, you would probably have to put an IsOper or some other such check in the whois code to give the real IP or whatever. But that is modification of the source, which is NOT supported. So unless the Unreal team add it, you will be on your own ;)
-ChatSpike IRC Network [http://www.chatspike.net]
-Denora Stats [http://denora.nomadirc.net]
-Omerta [http://www.barafranca.com]
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

Come on guys, let's just READ and think hmmk?
As Josh rightly says, you are even proposing insecure solutions.
I thought I would leave this thread open but it's getting worse every post ;).
Locked