This is a simple X commands script. It was written specifically for sambuca, and designed to be simple to use.
For loading instructions - please go to: http://queenelsa.us/en/scripts/sambuca
/*
This script was designed exclusively for ``SamBuca``, one of the most friendliest, kindest, nicest people you'll ever meet on IRC.
By: QueenElsa
*/
on *:CONNECT: {
if (!%x_access) { echo -a 0,7* X Commands [WARNING]* Your access level setting for this script was deleted. Attempting to automatically restore access level.
set %x_access 75
}
}
on *:LOAD: {
if (!%x_access) { echo -a 0,7* X Commands [WARNING]* Your access level setting for this script has never been set. Attempting to automatically set access level.
set %x_access 75
}
}
alias -l xban {
if (!%xc_chan) { echo -a 0,4* X Commands [ERROR]* Unable to ban. I don't know which channel to set this ban in. /join #development for assistance. | halt }
if (!%xc_target) { echo -a 0,4* X Commands [ERROR]* Unable to ban. I don't know who to ban. /join #development for assistance. | halt }
if (!%xc_duration) { echo -a 0,4* X Commands [ERROR]* Unable to ban. I don't know how long to set this ban for. /join #development for assistance. | halt }
if (!%x_access) { echo -a 0,4* X Commands [ERROR]* Unable to ban. I don't know what access level to set this ban for. Please run /setup or /join #development for assistance. | halt }
if (!%xc_reason) { echo -a 0,4* X Commands [ERROR]* Ban cancelled. You cannot set a ban without giving a reason. Please enter a reason when setting a ban. | halt }
else {
.msg X@channels.undernet.org BAN %xc_chan %xc_target %xc_duration %x_access %xc_reason
echo -a 0,3* X Commands [SUCCESS]* $+ %xc_target $+ was banned from $+ %xc_chan $+ for the reason: $+ %xc_reason $+
echo -a 0,3* X Commands [SUCCESS]* The ban on $+ %xc_target $+ will last for $+ %xc_duration $+ and can be removed by anyone with an access higher than $+ %x_access $+ .
unset %xc_*
}
}
alias -l xkick {
if (!%xc_chan) { echo -a 0,4* X Commands [ERROR]* Unable to kick. I don't know which channel to kick this user from. /join #development for assistance. | halt }
if (!%xc_target) { echo -a 0,4* X Commands [ERROR]* Unable to kick. I don't know who to kick. /join #development for assistance. | halt }
if (!%xc_reason) { echo -a 0,4* X Commands [ERROR]* kick cancelled. You cannot kick a user without giving a reason. Please enter a reason when kicking a user. | halt }
else {
.msg X@channels.undernet.org KICK %xc_chan %xc_target %xc_reason
echo -a 0,3* X Commands [SUCCESS]* $+ %xc_target $+ was kicked from $+ %xc_chan $+ for the reason: $+ %xc_reason $+
unset %xc_*
}
}
alias xsetup {
echo -a 1,8* X Commands [SETUP]* Setting access level to default level of 75.
set %x_access 75
echo -a 0,3* X Commands [SUCCESS]* The script will now use 75 as your access level when setting bans. This is the safest setting.
}
menu channel,nicklist {
X Commands
.Ban
..Ban $$1 for 3 hours: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 3h
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 3 hours. Why are you doing this?"
xban
}
..Ban $$1 for 6 hours: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 6h
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 6 hours. Why are you doing this?"
xban
}
..Ban $$1 for 1 day: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 1d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 1 day. Why are you doing this?"
xban
}
..Ban $$1 for 2 days: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 2d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 2 days. Why are you doing this?"
xban
}
..Ban $$1 for 1 week: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 7d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 1 week. Why are you doing this?"
xban
}
..Ban $$1 for 2 weeks: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 14d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 2 weeks. Why are you doing this?"
xban
}
..Ban $$1 for 1 month: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 30d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 1 month. Why are you doing this?"
xban
}
..Ban $$1 for 3 months: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 90d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 3 months. Why are you doing this?"
xban
}
..Ban $$1 for 1 year: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 365d
set %xc_reason $$?="You are banning $$1 from $chan $+ , for 1 year. Why are you doing this?"
xban
}
..Ban $$1 permanently: {
set %xc_chan $chan
set %xc_target $$1
set %xc_duration 0d
set %xc_reason $$?="You are banning $$1 from $chan $+ , **PERMANENTLY**. Why are you doing this?"
xban
}
.Kick
..Kick $$1: {
set %xc_chan $chan
set %xc_target $$1
set %xc_reason $$?="You are kicking $$1 from $chan $+ . Why are you doing this?"
xkick
}
}
menu channel {
X Commands
.Unban
..Unban by nick: { .msg X@channels.undernet.org unban $chan $address($?="What's the nick of the banned user?",2) }
..Unban by address: { .msg X@channels.undernet.org unban $chan $?="What's the address of the banned user?" }
}
menu menubar {
.X Commands Help
..I need help setting bans: {
echo -a 0,7-* X Commands [HELP]*- Topic: Setting bans
echo -a 0,7-* X Commands [HELP]*- I've made setting bans really easy for you, $me $+ .
echo -a 0,7-* X Commands [HELP]*- Let's pretend you were going to ban 4BadGuy from a channel.
echo -a 0,7-* X Commands [HELP]*- All you need to do is right click on the nick of the user you want to ban.
echo -a 0,7-* X Commands [HELP]*- Then click on X Commands > Ban > Ban BadGuy for 3 hours.
echo -a 0,7-* X Commands [HELP]*- The script would then ask you for a reason for the ban. Whatever reason you enter will be used as the kick message. 1,8Keep in mind, everyone can see the kick message.
echo -a 0,7-* X Commands [HELP]*- After you're done typing your ban message, click OK. The script will generate the ban command and send it to X automatically. This means you never need to know the command, as long as this script remains loaded.
}
..I need help removing bans: {
echo -a 0,7-* X Commands [HELP]*- Topic: Removing bans
echo -a 0,7-* X Commands [HELP]*- Removing bans is a little more complicated. I'll try to simplify the process, but it might not always work.
echo -a 0,7-* X Commands [HELP]*- To remove a ban, right click anywhere in the channel, and select X Commands > Unban.
echo -a 0,7-* X Commands [HELP]*- You can try to remove a ban by nick, just select Unban by nick. The script will then ask you for the nick of the banned user.
echo -a 0,7-* X Commands [HELP]*- If the banned user isn't online, this won't work.
echo -a 0,7-* X Commands [HELP]*- You can also remove a ban by the address. just select Unban by address. The script will then ask you for the address of the banned user.
echo -a 0,7-* X Commands [HELP]*- This will always work as long as the address matches the ban. Remember, you need to enter the address in the *!*@* format.
echo -a 0,7-* X Commands [HELP]*- For example: To unban IceTea from a channel, you'd need to use the exact address that was banned. This is called a banmask.
echo -a 0,7-* X Commands [HELP]*- Right click in the channel, click on X Commands > Unban > Unban by address. The script will then ask you for the address of the banned user.
echo -a 0,7-* X Commands [HELP]*- Enter the exact banmask that was set on IceTea: *!~mrmarko@190.232.106.220 and click OK.
echo -a 0,7-* X Commands [HELP]*- If the banmask matches one that X knows is set, it will be removed. If this does not happen, feel free to contact QueenElsa.
}
..I need help kicking users: {
echo -a 0,7-* X Commands [HELP]*- Topic: Kicking users
echo -a 0,7-* X Commands [HELP]*- Kicking users is a breeze now, thanks to this script.
echo -a 0,7-* X Commands [HELP]*- To do this, right click on the user's nick in the channel or the nicklist, and select X Commands > Kick > Kick nick.
echo -a 0,7-* X Commands [HELP]*- The script will then ask you for a kick reason. Once you type that and click OK, the user you selected will be kicked for the reason you specified.
}
..I think I'm gonna need more help than this: {
echo -a 0,7-* X Commands [HELP]*- Topic: I need more help
echo -a 0,7-* X Commands [HELP]*- For more help, you can always ask QueenElsa.
echo -a 0,7-* X Commands [HELP]*- If she's not available, you can ask any member of her staff in #Development
echo -a 0,7-* X Commands [HELP]*- Of course, you can also leave a privmsg for QueenElsa if she's not around, and she'll reply to it when she sees it.
}
}