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.

help with k and gline for unreal ircd

Old posts that have not been replied to for several years.
Locked
c
chatauspirate

help with k and gline for unreal ircd

Post by chatauspirate »

this is my code so far but it isnt working on gline at all and kline it will kline the nick but show a temp kline for user@host
can someone help me set it up so it will k or gline for 30 mintes
the unreal ircd commands are as follwe with the code to show youz

* *** KLINE Command ***
* -
* "Bans" a hostmask from connection to the IRC server.
* The user can however connect to other servers on the network !!
* IRC Operator only command.
* -
* Syntax: KLINE <hostmask> <reason>
* Example: KLINE *@*.host Abuse
* -

oh and i am a newbie so go easy

* *** GLINE command ***
* -
* Syntax: GLINE <user@host mask> <seconds to be banned> :<reason>
* (Adds a G:line for user@host)
* GLINE -<user@host mask> (Removes a G:line for user@host)
* Example: GLINE *@*.dal.net 900 :Spammers (Adds a 15 min G:line)
* GLINE *@*.host 1d5h :Spammers (Adds a 29 hour G:line)



bind pub m "@kline" pub_do_kline

proc pub_do_kline {nick host handle channel vars} {
set who [lindex $vars 0]
set what [lrange $vars 1 end]
if {$who == ""} {
return 0 }
if {$what == ""} {
putserv "Kline $who @* 30 :bye"
return 0
}
putserv "Kline -$who :$what"
return 0
}

any ideas
* -
m
masskilla
Op
Posts: 172
Joined: Wed Oct 03, 2001 8:00 pm
Location: Croatia

Post by masskilla »

Hi

Well the commands obviously require a hostmask, not a nickname.
So the putserv line should look like:

Code: Select all

putserv "Kline [maskhost $host] :$what"
However, that will set a kline on a host *!user@*.host.com
If you want a domain ban (*!*@*.host.com), you need:

Code: Select all

putserv "Kline *@[lindex [split [maskhost $host] @] 1] :$what"
That should work. If it doesn't, let me know.
MaSsKilla

#eggdrop
Undernet
Locked