This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need to ignore @staff.dalnet

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Need to ignore @staff.dalnet

Post by Thanhas »

Hello Friends i need it greet to normal users notany IRCop etc can you guys PLease Turen it to Ignore @staff.dalnen

Code: Select all

set welc(msg) "  \002Commands for Public Help\002"
set welc(chan) "#BigHosTers" 
set welc(type) "1" 

bind join - #BigHosTers* givewelcome 
proc givewelcome {nick uhost hand chan} { 
global welc 

set welctxt $welc(msg) 
regsub -all "%nick" $welctxt "$nick" welctxt 
regsub -all "%chan" $welctxt "$chan" welctxt 
switch $welc(type) { 
1 { puthelp "NOTICE $nick :$welctxt"
        puthelp "NOTICE $nick :  !info !uptime !vhost !Payment !Eggdrop !Psybnc !Contact !PsyHelp !reseller"
        puthelp "NOTICE $nick :  Ask all Questions on Main No Private if someone Invite you to any Company or Channel please let us know the nick Thank you for cooperation"
} 
2 { puthelp "PRIVMSG $nick :$welctxt" } 
} 
} 
putlog "Egghelp.org" 
the help will be Much appreciate. Thanks
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Just add

Code: Select all

set welc(badhost) "staff@dal.net"
in the settings part and add

Code: Select all

if {[string match -nocase "$nick!$uhost" "$welc(badhost)"]} { return }
below

Code: Select all

proc givewelcome {nick uhost hand chan} { 
global welc
:!:
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

as TCL_no_TK said, this is rather trivial to do, his method just has one small part incorrect which renders it all useless. He uses [set welc(badhost) ident@host], but then uses [string match nick!ident@host ident@host] which will of course never match. To get this to work we either need to change the [set welc(badhost)] section or the [string match]. Instead let's do both so you can use as many hosts as you like. If you use more than 1, seperate each additional with a space.

Code: Select all

-- instead of
set welc(badhost) "staff@dal.net"
-- use
set welc(badhost) "*staff.dal.net *some.network.i-hate.com *lamevhost.com etc*etc.com"
Then we need to correct the method TCL_no_TK was using within his [string match] check. This time we will iterate over the [split welc(badhost)] list and watch for [string match -nocase *@host ident@host].

Code: Select all

-- instead of
if {[string match -nocase "$nick!$uhost" "$welc(badhost)"]} { return }
-- use
foreach entry [split $welc(badhosts)] {
  if {[string match -nocase "*@$entry" $uhost]} { return }
}
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Needs a bit of work still

The host of an ircop on DALnet is staff.dalnet
I must have had nothing to do
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

arfer wrote:Needs a bit of work still

The host of an ircop on DALnet is staff.dalnet
how does it need work? you simply add *staff.dalnet* to the list. This is why it's a list. Your expected to add to it or modify things. Not having used dalnet since they went all "holier than thou" and started to ban any channel not fitting their particular "agenda" (read this as censoring/juping). I left that place in the dust long ago.
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Ok, I understand. I posted my response for TCL_no_TK before I read your input.

IRC networks come in all flavours and degrees of strangeness I suppose.
I must have had nothing to do
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

Hello,

Thanks for replay

but i am confused can some one from you give me in Quote the complete correct code?


Thank you
Post Reply