This Command is for a spezial team on our irc but i dont know how i can make this, i've tested some things and used google but i can't find a howto or
little script
This command provides timed G:Lines. If you match
a G:Line you cannot connect to ANY server on the
IRC network. A time of 0 in the GLINE makes it permanent (Never Expires).
In Unreal 3.1.1 you may also specify the time in the format 1d10h15m30s.
IRC Operators only.
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)
Edit: Fixed minor typo, thnx for the hint Speechles
Last edited by nml375 on Fri Mar 14, 2008 7:26 am, edited 2 times in total.
this script will use the input style you asked for in first post
!gline <nick> <time> <reason>
and tacks onto the end the handle of the user setting the gline
bind pub G !gline pub:gline
proc pub:gline {n u h c t} {
set nick "[lindex $t 0]"
set time "[lindex $t 1]"
set reason "[lrange $t 2 end]"
putserv "gline $nick $time :$reason ($h)"
}
the ircd will already tell ircops when the g:line is set (unless the ircd is poorly coded)
example:
*** G:Line added for *@x.x.x.x on Sat Feb 9 02:17:23 2008 GMT (from OperServ to expire at Mon Feb 11 02:17:23 2008 GMT: You're using an insecure proxy.)
I just don't see a reason to add the time to the g:line reason.
bind pub G !gline pub:gline
proc pub:gline {n u h c t} {
set nick "[lindex $t 0]"
set time "[lindex $t 1]"
set reason "[lrange $t 2 end]"
putserv "gline $nick $time :$reason ($h)"
}
Don't use list-commands on strings...
Also, keep in mind that lrange returns a list, not a string - considder joining the result.
Depends..
Do you want a "channel command", "msg command", or a "dcc partyline command"?
The code in my initial post is proper if you wish for a dcc partyline-based command. For a channel or msg-based command, some minor modifications would have to be made.
DragnLord's first post is flawed as it tries to access a non-existant local variable (intended to access a variable in globalspace), second uses lindex and lrange in an improper manner.
Seriously, if you're going to give "non opered" staff access to a gline command and they make the slightest mistake, you could gline the entire network.
You should instead think really hard how smart that is. (NOTE: your non opered staff could gline anyone, including opers)